Preparing report...

Report for github.com/nicolasassi/gomtch

A+    Excellent!    Found 6 issues across 10 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


gocyclo80%

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.

    • gomtch/doc.go
    • Line 227: warning: cyclomatic complexity 16 of function (Doc).specialCheck() is high (> 15) (gocyclo)
    • gomtch/doc_test.go
    • Line 430: warning: cyclomatic complexity 34 of function TestDoc_Scan() is high (> 15) (gocyclo)
    • Line 719: warning: cyclomatic complexity 29 of function BenchmarkDoc_Scan() is high (> 15) (gocyclo)

golint50%

Golint is a linter for Go source code.

    • gomtch/options.go
    • Line 12: warning: exported type Option should have comment or be unexported (golint)
    • Line 14: warning: exported function WithHMTLParsing should have comment or be unexported (golint)
    • Line 26: warning: exported function WithTransform should have comment or be unexported (golint)
    • Line 37: warning: exported function WithSequentialEqualCharsRemoval should have comment or be unexported (golint)
    • Line 58: warning: exported function WithSetLower should have comment or be unexported (golint)
    • Line 64: warning: exported function WithSetUpper should have comment or be unexported (golint)
    • Line 70: warning: exported function WithReplacer should have comment or be unexported (golint)
    • Line 76: warning: exported function WithMinimumMatchScore should have comment or be unexported (golint)
    • Line 84: warning: exported function WithConditionalMatchScore should have comment or be unexported (golint)
    • Line 90: warning: exported function WithCustomRegexpTokenizer should have comment or be unexported (golint)
    • gomtch/tokens.go
    • Line 7: warning: exported type Tokens should have comment or be unexported (golint)
    • Line 75: warning: exported function MakeTokens should have comment or be unexported (golint)
    • gomtch/transformer.go
    • Line 10: warning: exported type Transformer should have comment or be unexported (golint)
    • Line 14: warning: exported type ASCII should have comment or be unexported (golint)
    • Line 18: warning: exported function NewASCII should have comment or be unexported (golint)
    • Line 22: warning: exported method ASCII.Transform should have comment or be unexported (golint)
    • gomtch/doc.go
    • Line 17: warning: exported type Doc should have comment or be unexported (golint)
    • Line 25: warning: exported type Matches should have comment or be unexported (golint)
    • Line 27: warning: exported function NewDoc should have comment or be unexported (golint)
    • Line 115: warning: exported method Doc.Scan should have comment or be unexported (golint)
    • Line 133: warning: exported method Doc.Compare should have comment or be unexported (golint)
    • Line 192: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gomtch/document.go
    • Line 5: warning: exported type Document should have comment or be unexported (golint)
    • Line 12: warning: exported type Scanner should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.

    • gomtch/doc_test.go
    • Line 555: warning: ineffectual assignment to err (ineffassign)
    • Line 582: warning: ineffectual assignment to err (ineffassign)
    • Line 609: warning: ineffectual assignment to err (ineffassign)
    • Line 636: warning: ineffectual assignment to err (ineffassign)
    • Line 663: warning: ineffectual assignment to err (ineffassign)
    • Line 785: warning: ineffectual assignment to err (ineffassign)
    • Line 807: warning: ineffectual assignment to err (ineffassign)
    • Line 829: warning: ineffectual assignment to err (ineffassign)
    • Line 851: warning: ineffectual assignment to err (ineffassign)
    • Line 874: warning: ineffectual assignment to err (ineffassign)
    • Line 896: warning: ineffectual assignment to err (ineffassign)

misspell90%

Misspell Finds commonly misspelled English words

    • gomtch/doc_test.go
    • Line 402: warning: "Ingredientes" is a misspelling of "Ingredients" (misspell)
    • Line 441: warning: "Ingredientes" is a misspelling of "Ingredients" (misspell)