Preparing report...

Report for github.com/elastic/go-ucfg

A+    Excellent!    Found 11 issues across 47 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!


golint93%

Golint is a linter for Go source code.

    • go-ucfg/cfgutil/cfgutil.go
    • Line 30: warning: exported function NewCollector should have comment or be unexported (golint)
    • Line 37: warning: exported method Collector.GetOptions should have comment or be unexported (golint)
    • Line 41: warning: exported method Collector.Get should have comment or be unexported (golint)
    • Line 45: warning: exported method Collector.Config should have comment or be unexported (golint)
    • Line 53: warning: exported method Collector.Add should have comment or be unexported (golint)
    • go-ucfg/flag/flag.go
    • Line 28: warning: exported function ConfigVar should have comment or be unexported (golint)
    • Line 40: warning: exported function Config should have comment or be unexported (golint)
    • Line 49: warning: exported function ConfigFilesVar should have comment or be unexported (golint)
    • Line 62: warning: exported function ConfigFiles should have comment or be unexported (golint)
    • Line 72: warning: exported function ConfigYAMLFilesVar should have comment or be unexported (golint)
    • Line 83: warning: exported function ConfigYAMLFiles should have comment or be unexported (golint)
    • Line 92: warning: exported function ConfigJSONFilesVar should have comment or be unexported (golint)
    • Line 103: warning: exported function ConfigJSONFiles should have comment or be unexported (golint)
    • Line 112: warning: exported function ConfigFilesExtsVar should have comment or be unexported (golint)
    • Line 127: warning: exported function ConfigFilesExts should have comment or be unexported (golint)
    • go-ucfg/flag/util.go
    • Line 27: warning: exported type FlagValue should have comment or be unexported (golint)
    • Line 43: warning: exported method FlagValue.Config should have comment or be unexported (golint)
    • Line 59: warning: exported method FlagValue.Get should have comment or be unexported (golint)
    • Line 63: warning: exported method FlagValue.Set should have comment or be unexported (golint)

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.

    • go-ucfg/reify.go
    • Line 434: warning: cyclomatic complexity 19 of function reifyMergeValue() is high (> 15) (gocyclo)
    • Line 693: warning: cyclomatic complexity 18 of function doReifyPrimitive() is high (> 15) (gocyclo)
    • Line 359: warning: cyclomatic complexity 17 of function reifyValue() is high (> 15) (gocyclo)

ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell95%

Misspell Finds commonly misspelled English words