Preparing report...

Report for github.com/generaltso/linguist

A    Great!    Found 8 issues across 13 files

Tweet

gofmt76%

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!


gocyclo76%

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.


golint38%

Golint is a linter for Go source code.

    • linguist/tokenizer/tokenizer.go
    • Line 1: warning: package comment should be of the form "Package tokenizer ..." (golint)
    • Line 20: warning: comment on exported var ByteLimit should be of the form "ByteLimit ..." (golint)
    • Line 23: warning: comment on exported var StartLineComments should be of the form "StartLineComments ..." (golint)
    • Line 29: warning: exported var SingleLineComments should have comment or be unexported (golint)
    • Line 65: warning: comment on exported function FindMultiLineComment should be of the form "FindMultiLineComment ..." (golint)
    • Line 77: warning: comment on exported function Tokenize should be of the form "Tokenize ..." (golint)
    • Line 96: warning: don't use underscores in Go names; var ml_in should be mlIn (golint)
    • Line 97: warning: don't use underscores in Go names; var ml_end should be mlEnd (golint)
    • Line 98: warning: don't use underscores in Go names; var str_in should be strIn (golint)
    • Line 99: warning: don't use underscores in Go names; var str_end should be strEnd (golint)
    • Line 121: warning: don't use underscores in Go names; var ln_buf should be lnBuf (golint)
    • Line 126: warning: don't use underscores in Go names; var tk_b should be tkB (golint)
    • Line 127: warning: don't use underscores in Go names; var tk_s should be tkS (golint)
    • linguist/cmd/l/fs.go
    • Line 125: warning: don't use underscores in Go names; var by_name should be byName (golint)
    • Line 142: warning: don't use underscores in Go names; var by_data should be byData (golint)
    • linguist/cmd/l/git.go
    • Line 11: warning: don't use underscores in Go names; func parameter tree_id should be treeID (golint)
    • Line 65: warning: don't use underscores in Go names; var by_name should be byName (golint)
    • Line 82: warning: don't use underscores in Go names; var by_data should be byData (golint)
    • linguist/cmd/l/main.go
    • Line 29: warning: don't use underscores in Go names; var input_mode_git should be inputModeGit (golint)
    • Line 30: warning: don't use underscores in Go names; var input_mode_fs should be inputModeFs (golint)
    • Line 31: warning: don't use underscores in Go names; var input_git_tree should be inputGitTree (golint)
    • Line 32: warning: don't use underscores in Go names; var output_json should be outputJSON (golint)
    • Line 33: warning: don't use underscores in Go names; var output_json_with_colors should be outputJSONWithColors (golint)
    • Line 34: warning: don't use underscores in Go names; var output_limit should be outputLimit (golint)
    • Line 35: warning: don't use underscores in Go names; var output_debug should be outputDebug (golint)
    • Line 36: warning: don't use underscores in Go names; var unignore_filenames should be unignoreFilenames (golint)
    • Line 37: warning: don't use underscores in Go names; var unignore_contents should be unignoreContents (golint)
    • Line 47: warning: don't use underscores in Go names; type language_color should be languageColor (golint)
    • Line 70: warning: don't use underscores in Go names; var total_size should be totalSize (golint)
    • Line 71: warning: don't use underscores in Go names; var num_files should be numFiles (golint)
    • Line 72: warning: don't use underscores in Go names; var max_len should be maxLen (golint)
    • Line 73: warning: don't use underscores in Go names; var ignored_paths should be ignoredPaths (golint)
    • Line 78: warning: don't use underscores in Go names; var total_size should be totalSize (golint)
    • Line 147: warning: don't use underscores in Go names; var default_input_mode_git should be defaultInputModeGit (golint)
    • Line 148: warning: don't use underscores in Go names; var default_input_mode_fs should be defaultInputModeFs (golint)
    • Line 223: warning: don't use underscores in Go names; var json_bytes should be jsonBytes (golint)
    • linguist/analyse.go
    • Line 14: warning: don't use underscores in Go names; var classifier_initialized should be classifierInitialized (golint)
    • Line 39: warning: comment on exported function Analyse should be of the form "Analyse ..." (golint)
    • Line 63: warning: don't use underscores in Go names; var best_score should be bestScore (golint)
    • Line 64: warning: don't use underscores in Go names; var best_answer should be bestAnswer (golint)
    • linguist/exclude.go
    • Line 26: warning: comment on exported function ShouldIgnoreFilename should be of the form "ShouldIgnoreFilename ..." (golint)
    • Line 33: warning: comment on exported function ShouldIgnoreContents should be of the form "ShouldIgnoreContents ..." (golint)
    • Line 61: warning: comment on exported function IsVendored should be of the form "IsVendored ..." (golint)
    • Line 66: warning: comment on exported function IsDocumentation should be of the form "IsDocumentation ..." (golint)
    • Line 71: warning: comment on exported function IsBinary should be of the form "IsBinary ..." (golint)
    • linguist/linguist.go
    • Line 66: warning: comment on exported function LanguageColor should be of the form "LanguageColor ..." (golint)
    • Line 78: warning: comment on exported function LanguageByFilename should be of the form "LanguageByFilename ..." (golint)
    • Line 96: warning: comment on exported function LanguageHints should be of the form "LanguageHints ..." (golint)
    • Line 115: warning: comment on exported function LanguageByContents should be of the form "LanguageByContents ..." (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!


misspell92%

Misspell Finds commonly misspelled English words