Preparing report...

Report for github.com/wpdirectory/wpdir

A+    Excellent!    Found 13 issues across 48 files

Tweet

gofmt93%

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!


gocyclo81%

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.

    • wpdir/internal/index/index.go
    • Line 261: warning: cyclomatic complexity 21 of function detectBinary() is high (> 15) (gocyclo)
    • Line 411: warning: cyclomatic complexity 16 of function indexAllZipFiles() is high (> 15) (gocyclo)

golint85%

Golint is a linter for Go source code.

    • wpdir/internal/codesearch/regexp/match.go
    • Line 351: warning: comment on exported type Grep should be of the form "Grep ..." (with optional leading article) (golint)
    • Line 367: warning: exported method Grep.AddFlags should have comment or be unexported (golint)
    • Line 374: warning: exported method Grep.File should have comment or be unexported (golint)
    • Line 399: warning: exported method Grep.Reader should have comment or be unexported (golint)
    • wpdir/internal/codesearch/regexp/regexp.go
    • Line 53: warning: exported method Regexp.Match should have comment or be unexported (golint)
    • Line 53: warning: receiver name r should be consistent with previous receiver name re for Regexp (golint)
    • Line 57: warning: exported method Regexp.MatchString should have comment or be unexported (golint)
    • Line 57: warning: receiver name r should be consistent with previous receiver name re for Regexp (golint)
    • wpdir/internal/codesearch/index/read.go
    • Line 96: warning: exported function Open should have comment or be unexported (golint)
    • Line 131: warning: exported method Index.Close should have comment or be unexported (golint)
    • Line 276: warning: exported method Index.PostingList should have comment or be unexported (golint)
    • Line 290: warning: exported method Index.PostingAnd should have comment or be unexported (golint)
    • Line 312: warning: exported method Index.PostingOr should have comment or be unexported (golint)
    • Line 336: warning: exported method Index.PostingQuery should have comment or be unexported (golint)
    • wpdir/internal/index/index.go
    • Line 36: warning: exported type Index should have comment or be unexported (golint)
    • Line 42: warning: exported type IndexOptions should have comment or be unexported (golint)
    • Line 47: warning: exported type SearchOptions should have comment or be unexported (golint)
    • Line 56: warning: exported type Match should have comment or be unexported (golint)
    • Line 63: warning: exported type SearchResponse should have comment or be unexported (golint)
    • Line 72: warning: exported type FileMatch should have comment or be unexported (golint)
    • Line 77: warning: exported type ExcludedFile should have comment or be unexported (golint)
    • Line 82: warning: exported type IndexRef should have comment or be unexported (golint)
    • Line 88: warning: exported method IndexRef.Dir should have comment or be unexported (golint)
    • Line 102: warning: exported method IndexRef.Open should have comment or be unexported (golint)
    • Line 109: warning: exported method IndexRef.Remove should have comment or be unexported (golint)
    • Line 113: warning: exported method Index.Close should have comment or be unexported (golint)
    • Line 119: warning: exported method Index.Destroy should have comment or be unexported (golint)
    • wpdir/internal/repo/repo.go
    • Line 599: warning: comment on exported method Repo.GenerateInstallsChart should be of the form "GenerateInstallsChart ..." (golint)
    • Line 680: warning: comment on exported method Repo.GenerateSizeChart should be of the form "GenerateSizeChart ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!