Preparing report...

Report for github.com/schollz/closestmatch

B    Not bad!    Found 8 issues across 8 files

Tweet

gofmt62%

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!


gocyclo87%

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.


golint50%

Golint is a linter for Go source code.

    • closestmatch/cmclient/client.go
    • Line 27: warning: exported method Connection.Closest should have comment or be unexported (golint)
    • Line 62: warning: exported method Connection.ClosestN should have comment or be unexported (golint)
    • closestmatch/test/data.go
    • Line 112: warning: exported var WordsToTest should have comment or be unexported (golint)
    • Line 113: warning: exported var SearchWords should have comment or be unexported (golint)
    • closestmatch/levenshtein/levenshtein.go
    • Line 8: warning: comment on exported function LevenshteinDistance should be of the form "LevenshteinDistance ..." (golint)
    • Line 45: warning: exported type ClosestMatch should have comment or be unexported (golint)
    • Line 49: warning: exported function New should have comment or be unexported (golint)
    • Line 55: warning: exported method ClosestMatch.Closest should have comment or be unexported (golint)
    • Line 68: warning: exported method ClosestMatch.Accuracy should have comment or be unexported (golint)
    • Line 157: warning: exported method ClosestMatch.AccuracySimple should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign62%

IneffAssign detects ineffectual assignments in Go code.

    • closestmatch/cmserver/server.go
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: could not import github.com/gin-gonic/gin (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/jcelliott/lumber (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/schollz/closestmatch (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import gopkg.in/urfave/cli.v1 (invalid package name: "") (ineffassign)
    • Line 25: warning: undeclared name: cli (ineffassign)
    • Line 30: warning: undeclared name: cli (ineffassign)
    • Line 87: warning: undeclared name: cli (ineffassign)
    • Line 88: warning: undeclared name: cli (ineffassign)
    • Line 93: warning: undeclared name: cli (ineffassign)
    • Line 98: warning: undeclared name: cli (ineffassign)
    • Line 103: warning: undeclared name: cli (ineffassign)
    • Line 16: warning: "gopkg.in/urfave/cli.v1" imported but not used (ineffassign)

misspell87%

Misspell Finds commonly misspelled English words