Preparing report...

Report for github.com/akeylesslabs/cli

A+    Excellent!    Found 19 issues across 73 files

Tweet

gofmt95%

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!


golint90%

Golint is a linter for Go source code.

    • cli/ext/decoders.go
    • Line 50: warning: exported method Time.Decode should have comment or be unexported (golint)
    • Line 79: warning: exported method Time.Encode should have comment or be unexported (golint)
    • Line 83: warning: exported method Time.IsSet should have comment or be unexported (golint)
    • Line 92: warning: exported method Duration.Decode should have comment or be unexported (golint)
    • Line 105: warning: exported method Duration.Encode should have comment or be unexported (golint)
    • Line 115: warning: exported method File.Data should have comment or be unexported (golint)
    • Line 126: warning: exported method File.Decode should have comment or be unexported (golint)
    • Line 144: warning: exported method File.Encode should have comment or be unexported (golint)
    • Line 148: warning: comment on exported type Reader should be of the form "Reader ..." (with optional leading article) (golint)
    • Line 154: warning: exported method Reader.Decode should have comment or be unexported (golint)
    • Line 195: warning: exported method Reader.Close should have comment or be unexported (golint)
    • Line 204: warning: exported method Reader.Name should have comment or be unexported (golint)
    • Line 211: warning: exported method Reader.IsStdin should have comment or be unexported (golint)
    • Line 221: warning: comment on exported type Writer should be of the form "Writer ..." (with optional leading article) (golint)
    • Line 227: warning: exported method Writer.Decode should have comment or be unexported (golint)
    • Line 268: warning: exported method Writer.Close should have comment or be unexported (golint)
    • Line 277: warning: exported method Writer.Name should have comment or be unexported (golint)
    • Line 284: warning: exported method Writer.IsStdout should have comment or be unexported (golint)
    • Line 294: warning: comment on exported type CSVRecord should be of the form "CSVRecord ..." (with optional leading article) (golint)
    • Line 299: warning: exported method CSVRecord.Decode should have comment or be unexported (golint)
    • Line 309: warning: exported method CSVRecord.Strings should have comment or be unexported (golint)
    • Line 313: warning: exported method CSVRecord.Bools should have comment or be unexported (golint)
    • Line 332: warning: exported method CSVRecord.Ints should have comment or be unexported (golint)
    • Line 344: warning: exported method CSVRecord.Uints should have comment or be unexported (golint)
    • Line 356: warning: exported method CSVRecord.Floats should have comment or be unexported (golint)
    • cli/ext/pidfile.go
    • Line 7: warning: comment on exported type PidFile should be of the form "PidFile ..." (with optional leading article) (golint)
    • Line 14: warning: exported method PidFile.Decode should have comment or be unexported (golint)
    • Line 19: warning: exported method PidFile.New should have comment or be unexported (golint)
    • Line 23: warning: exported method PidFile.Remove should have comment or be unexported (golint)
    • cli/builtin.go
    • Line 27: warning: comment on exported type Addr should be of the form "Addr ..." (with optional leading article) (golint)
    • Line 33: warning: comment on exported type AddrWithShort should be of the form "AddrWithShort ..." (with optional leading article) (golint)
    • Line 39: warning: comment on exported method Addr.ToString should be of the form "ToString ..." (golint)
    • Line 44: warning: comment on exported method AddrWithShort.ToString should be of the form "ToString ..." (golint)
    • cli/editor.go
    • Line 11: warning: exported const DefaultEditor should have comment or be unexported (golint)
    • cli/flag.go
    • Line 121: warning: don't use underscores in Go names; const builtinVar_EXEC_PATH should be builtinVarEXECPATH (golint)
    • Line 122: warning: don't use underscores in Go names; const builtinVar_EXEC_FILENAME should be builtinVarEXECFILENAME (golint)
    • cli/parser.go
    • Line 33: warning: comment on exported type JSONParser should be of the form "JSONParser ..." (with optional leading article) (golint)
    • Line 42: warning: exported method JSONParser.Parse should have comment or be unexported (golint)
    • Line 46: warning: comment on exported type JSONFileParser should be of the form "JSONFileParser ..." (with optional leading article) (golint)
    • Line 55: warning: exported method JSONFileParser.Parse should have comment or be unexported (golint)
    • Line 59: warning: comment on exported type JSONConfigFileParser should be of the form "JSONConfigFileParser ..." (with optional leading article) (golint)
    • Line 68: warning: exported method JSONConfigFileParser.Parse should have comment or be unexported (golint)
    • Line 72: warning: comment on exported type URLParser should be of the form "URLParser ..." (with optional leading article) (golint)
    • Line 81: warning: exported method URLParser.Parse should have comment or be unexported (golint)
    • cli/clis/support.go
    • Line 30: warning: exported var Opts should have comment or be unexported (golint)
    • Line 33: warning: exported function Setup should have comment or be unexported (golint)

gocyclo89%

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.

    • cli/flag.go
    • Line 321: warning: cyclomatic complexity 30 of function setWithProperType() is high (> 15) (gocyclo)
    • Line 125: warning: cyclomatic complexity 20 of function parseExpression() is high (> 15) (gocyclo)
    • Line 63: warning: cyclomatic complexity 16 of function (*flag).init() is high (> 15) (gocyclo)
    • cli/command.go
    • Line 266: warning: cyclomatic complexity 30 of function (*Command).prepare() is high (> 15) (gocyclo)
    • cli/tagm.go
    • Line 19: warning: cyclomatic complexity 23 of function (*multiTag).scan() is high (> 15) (gocyclo)
    • cli/flag_set.go
    • Line 124: warning: cyclomatic complexity 20 of function (flagSlice).String() is high (> 15) (gocyclo)
    • cli/tag.go
    • Line 54: warning: cyclomatic complexity 17 of function parseTag() is high (> 15) (gocyclo)
    • cli/cli.go
    • Line 192: warning: cyclomatic complexity 31 of function parseArgsToFlagSet() is high (> 15) (gocyclo)
    • Line 117: warning: cyclomatic complexity 17 of function initFlagSet() is high (> 15) (gocyclo)

ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell93%

Misspell Finds commonly misspelled English words

    • cli/ext/decoders.go
    • Line 187: warning: "implementes" is a misspelling of "implements" (misspell)
    • Line 251: warning: "implementes" is a misspelling of "implements" (misspell)
    • cli/tag.go
    • Line 18: warning: "seperate" is a misspelling of "separate" (misspell)
    • Line 46: warning: "seperate" is a misspelling of "separate" (misspell)