Preparing report...

Report for github.com/boyter/cs

A+    Excellent!    Found 26 issues across 61 files

Tweet

gofmt98%

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!


gocyclo86%

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.

    • cs/file/file.go
    • Line 95: warning: cyclomatic complexity 40 of function (*FileWalker).walkDirectoryRecursive() is high (> 15) (gocyclo)

golint63%

Golint is a linter for Go source code.

    • cs/str/common.go
    • Line 10: warning: comment on exported function RemoveStringDuplicates should be of the form "RemoveStringDuplicates ..." (golint)
    • Line 27: warning: exported function Contains should have comment or be unexported (golint)
    • Line 37: warning: comment on exported function PermuteCase should be of the form "PermuteCase ..." (golint)
    • Line 64: warning: comment on exported function PermuteCaseFolding should be of the form "PermuteCaseFolding ..." (golint)
    • Line 81: warning: comment on exported function AllSimpleFold should be of the form "AllSimpleFold ..." (golint)
    • Line 111: warning: comment on exported function IsSpace should be of the form "IsSpace ..." (golint)
    • Line 132: warning: comment on exported function StartOfRune should be of the form "StartOfRune ..." (golint)
    • cs/processor/arguments.go
    • Line 16: warning: comment on exported var Error should be of the form "Error ..." (golint)
    • Line 19: warning: comment on exported var IncludeMinified should be of the form "IncludeMinified ..." (golint)
    • Line 22: warning: comment on exported var MinifiedLineByteLength should be of the form "MinifiedLineByteLength ..." (golint)
    • Line 25: warning: comment on exported var MaxReadSizeBytes should be of the form "MaxReadSizeBytes ..." (golint)
    • Line 28: warning: comment on exported var IgnoreGitIgnore should be of the form "IgnoreGitIgnore ..." (golint)
    • Line 31: warning: comment on exported var IgnoreIgnoreFile should be of the form "IgnoreIgnoreFile ..." (golint)
    • Line 46: warning: comment on exported var PathDenylist should be of the form "PathDenylist ..." (golint)
    • Line 49: warning: comment on exported var LocationExcludePattern should be of the form "LocationExcludePattern ..." (golint)
    • Line 70: warning: comment on exported var IncludeHidden should be of the form "IncludeHidden ..." (golint)
    • cs/processor/parser/lexer.go
    • Line 31: warning: comment on exported type Token should be of the form "Token ..." (with optional leading article) (golint)
    • Line 38: warning: exported type Lexer should have comment or be unexported (golint)
    • Line 43: warning: exported function NewLexer should have comment or be unexported (golint)
    • Line 59: warning: comment on exported method Lexer.Next should be of the form "Next ..." (golint)
    • Line 70: warning: comment on exported method Lexer.NextToken should be of the form "NextToken ..." (golint)
    • Line 166: warning: exported method Lexer.Tokens should have comment or be unexported (golint)
    • cs/processor/go-gitignore/gitignore.go
    • Line 11: warning: exported type IgnoreMatcher should have comment or be unexported (golint)
    • Line 21: warning: exported function NewGitIgnore should have comment or be unexported (golint)
    • Line 38: warning: exported function NewGitIgnoreFromReader should have comment or be unexported (golint)
    • cs/str/index_benchmark_test.go
    • Line 10: warning: don't use underscores in Go names; var test_MatchEndCase should be testMatchEndCase (golint)
    • Line 11: warning: don't use underscores in Go names; var test_UnicodeMatchEndCase should be testUnicodeMatchEndCase (golint)
    • Line 13: warning: don't use underscores in Go names; var test_MatchEndCaseLarge should be testMatchEndCaseLarge (golint)
    • Line 14: warning: don't use underscores in Go names; var test_UnicodeMatchEndCaseLarge should be testUnicodeMatchEndCaseLarge (golint)
    • cs/processor/fuzz.go
    • Line 12: warning: comment on exported function Fuzz should be of the form "Fuzz ..." (golint)
    • Line 18: warning: don't use underscores in Go names; var md5_d should be md5D (golint)
    • cs/processor/tui.go
    • Line 226: warning: exported const SearchMode should have comment (or a comment on this block) or be unexported (golint)
    • Line 232: warning: comment on exported function ProcessTui should be of the form "ProcessTui ..." (golint)
    • cs/processor/parser/parser.go
    • Line 10: warning: exported type Expr should have comment or be unexported (golint)
    • Line 17: warning: exported type Parser should have comment or be unexported (golint)
    • Line 21: warning: exported function NewParser should have comment or be unexported (golint)
    • Line 27: warning: exported method Parser.Parse should have comment or be unexported (golint)
    • cs/str/index.go
    • Line 90: warning: don't use underscores in Go names; var __permuteCache should be _PermuteCache (golint)
    • Line 91: warning: don't use underscores in Go names; var __permuteCacheLock should be _PermuteCacheLock (golint)
    • Line 92: warning: don't use underscores in Go names; var __permuteCacheSize should be _PermuteCacheSize (golint)
    • cs/processor/processor.go
    • Line 11: warning: exported var Version should have comment or be unexported (golint)
    • Line 13: warning: comment on exported function CleanSearchString should be of the form "CleanSearchString ..." (golint)
    • Line 34: warning: exported type Process should have comment or be unexported (golint)
    • Line 39: warning: exported function NewProcess should have comment or be unexported (golint)
    • Line 45: warning: comment on exported method Process.StartProcess should be of the form "StartProcess ..." (golint)
    • cs/processor/worker_file.go
    • Line 16: warning: exported type FileReaderWorker should have comment or be unexported (golint)
    • Line 24: warning: exported function NewFileReaderWorker should have comment or be unexported (golint)
    • Line 33: warning: exported method FileReaderWorker.GetFileCount should have comment or be unexported (golint)
    • Line 37: warning: comment on exported method FileReaderWorker.Start should be of the form "Start ..." (golint)
    • cs/processor/worker_searcher.go
    • Line 15: warning: exported type SearcherWorker should have comment or be unexported (golint)
    • Line 31: warning: exported function NewSearcherWorker should have comment or be unexported (golint)
    • Line 41: warning: comment on exported method SearcherWorker.Start should be of the form "Start ..." (golint)
    • cs/file/file.go
    • Line 20: warning: error var TerminateWalkError should have name of the form ErrFoo (golint)
    • Line 20: warning: exported var TerminateWalkError should have comment or be unexported (golint)
    • Line 22: warning: exported type File should have comment or be unexported (golint)
    • Line 27: warning: exported type FileWalker should have comment or be unexported (golint)
    • Line 43: warning: exported function NewFileWalker should have comment or be unexported (golint)
    • Line 58: warning: comment on exported method FileWalker.Walking should be of the form "Walking ..." (golint)
    • Line 66: warning: comment on exported method FileWalker.Terminate should be of the form "Terminate ..." (golint)
    • Line 76: warning: comment on exported method FileWalker.Start should be of the form "Start ..." (golint)
    • Line 265: warning: comment on exported function FindRepositoryRoot should be of the form "FindRepositoryRoot ..." (golint)
    • Line 316: warning: comment on exported function GetExtension should be of the form "GetExtension ..." (golint)
    • cs/str/fuzz.go
    • Line 10: warning: comment on exported function Fuzz should be of the form "Fuzz ..." (golint)
    • Line 16: warning: don't use underscores in Go names; var md5_d should be md5D (golint)
    • cs/processor/snippet.go
    • Line 14: warning: exported const SnipSideMax should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: comment on exported const PhraseHeavyBoost should be of the form "PhraseHeavyBoost ..." (golint)
    • Line 19: warning: comment on exported const RelevanceCutoff should be of the form "RelevanceCutoff ..." (golint)
    • Line 37: warning: exported type Snippet should have comment or be unexported (golint)
    • cs/processor/worker_summarize.go
    • Line 16: warning: exported type ResultSummarizer should have comment or be unexported (golint)
    • Line 26: warning: exported function NewResultSummarizer should have comment or be unexported (golint)
    • Line 37: warning: exported method ResultSummarizer.Start should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words