Preparing report...

Report for github.com/yanyiwu/gojieba

A    Great!    Found 7 issues across 9 files

Tweet

gofmt88%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo100%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

No problems detected. Good job!


golint22%

Golint is a linter for Go source code.

    • gojieba/util.go
    • Line 16: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gojieba/config.go
    • Line 9: warning: exported var DICT_DIR should have comment or be unexported (golint)
    • Line 26: warning: exported const TOTAL_DICT_PATH_NUMBER should have comment or be unexported (golint)
    • gojieba/jieba.go
    • Line 11: warning: exported type TokenizeMode should have comment or be unexported (golint)
    • Line 14: warning: exported const DefaultMode should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type Word should have comment or be unexported (golint)
    • Line 24: warning: exported type Jieba should have comment or be unexported (golint)
    • Line 28: warning: exported function NewJieba should have comment or be unexported (golint)
    • Line 47: warning: exported method Jieba.Free should have comment or be unexported (golint)
    • Line 51: warning: exported method Jieba.Cut should have comment or be unexported (golint)
    • Line 52: warning: don't use underscores in Go names; var c_int_hmm should be cIntHmm (golint)
    • Line 64: warning: exported method Jieba.CutAll should have comment or be unexported (golint)
    • Line 73: warning: exported method Jieba.CutForSearch should have comment or be unexported (golint)
    • Line 74: warning: don't use underscores in Go names; var c_int_hmm should be cIntHmm (golint)
    • Line 86: warning: exported method Jieba.Tag should have comment or be unexported (golint)
    • Line 95: warning: exported method Jieba.AddWord should have comment or be unexported (golint)
    • Line 101: warning: exported method Jieba.Tokenize should have comment or be unexported (golint)
    • Line 102: warning: don't use underscores in Go names; var c_int_hmm should be cIntHmm (golint)
    • Line 113: warning: exported type WordWeight should have comment or be unexported (golint)
    • Line 118: warning: exported method Jieba.Extract should have comment or be unexported (golint)
    • Line 127: warning: exported method Jieba.ExtractWithWeight should have comment or be unexported (golint)
    • gojieba/jieba_test.go
    • Line 13: warning: don't use underscores in Go names; var use_hmm should be useHmm (golint)
    • Line 97: warning: don't use underscores in Go names; var use_hmm should be useHmm (golint)
    • Line 206: warning: don't use underscores in Go names; var word_weights should be wordWeights (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!