Preparing report...

Report for github.com/puppetlabs/wash

A+    Excellent!    Found 82 issues across 378 files

Tweet

gofmt92%

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!


gocyclo97%

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.

    • wash/plugin/external/pluginEntry.go
    • Line 676: warning: cyclomatic complexity 35 of function unmarshalSchemaGraph() is high (> 15) (gocyclo)
    • Line 140: warning: cyclomatic complexity 18 of function (decodedExternalPluginEntry).toExternalPluginEntry() is high (> 15) (gocyclo)
    • wash/cmd/ls.go
    • Line 92: warning: cyclomatic complexity 16 of function lsMain() is high (> 15) (gocyclo)

golint89%

Golint is a linter for Go source code.

    • wash/api/rql/ast/predicateExpression.go
    • Line 12: warning: don't use underscores in Go names; func PE_Primary should be PEPrimary (golint)
    • Line 19: warning: don't use underscores in Go names; func PE_Object should be PEObject (golint)
    • Line 27: warning: don't use underscores in Go names; func NPE_ActionPredicate should be NPEActionPredicate (golint)
    • Line 34: warning: don't use underscores in Go names; func NPE_StringPredicate should be NPEStringPredicate (golint)
    • Line 39: warning: don't use underscores in Go names; func NPE_TimePredicate should be NPETimePredicate (golint)
    • Line 44: warning: don't use underscores in Go names; func NPE_UnsignedNumericPredicate should be NPEUnsignedNumericPredicate (golint)
    • wash/api/rql/internal/predicate/string.go
    • Line 19: warning: exported function StringGlob should have comment or be unexported (golint)
    • Line 65: warning: exported function StringRegex should have comment or be unexported (golint)
    • Line 108: warning: exported function StringEqual should have comment or be unexported (golint)
    • Line 155: warning: exported function String should have comment or be unexported (golint)
    • Line 208: warning: exported function StringValue should have comment or be unexported (golint)
    • Line 216: warning: exported function StringValueGlob should have comment or be unexported (golint)
    • Line 220: warning: exported function StringValueRegex should have comment or be unexported (golint)
    • Line 224: warning: exported function StringValueEqual should have comment or be unexported (golint)
    • wash/api/rql/internal/matcher/core.go
    • Line 7: warning: exported type Matcher should have comment or be unexported (golint)
    • Line 9: warning: exported function Array should have comment or be unexported (golint)
    • Line 16: warning: exported function Value should have comment or be unexported (golint)
    • wash/api/rql/ast/asttest/suite.go
    • Line 52: warning: exported method Suite.SetupTest should have comment or be unexported (golint)
    • Line 108: warning: exported method Suite.ToJSONSchemas should have comment or be unexported (golint)
    • Line 239: warning: exported type InterfaceCode should have comment or be unexported (golint)
    • Line 253: warning: exported method Suite.AssertNotImplemented should have comment or be unexported (golint)
    • wash/api/rql/internal/predicate/collectionBase_test.go
    • Line 206: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 214: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 222: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 235: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 248: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 262: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 271: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • wash/api/rql/internal/primary/meta/valuePredicate.go
    • Line 10: warning: exported type SchemaPredicate should have comment or be unexported (golint)
    • Line 73: warning: exported function NewValuePredicate should have comment or be unexported (golint)
    • Line 79: warning: exported function MakeSchemaPredicate should have comment or be unexported (golint)
    • Line 85: warning: comment on exported type ValuePredicateBase should be of the form "ValuePredicateBase ..." (with optional leading article) (golint)
    • Line 91: warning: exported method ValuePredicateBase.EvalValueSchema should have comment or be unexported (golint)
    • wash/api/rql/internal/predicate/numeric.go
    • Line 13: warning: exported function Numeric should have comment or be unexported (golint)
    • Line 20: warning: exported function UnsignedNumeric should have comment or be unexported (golint)
    • Line 95: warning: exported function NumericValue should have comment or be unexported (golint)
    • wash/api/rql/internal/predicate/expression.go
    • Line 14: warning: don't use underscores in Go names; func NPE_StringPredicate should be NPEStringPredicate (golint)
    • Line 21: warning: don't use underscores in Go names; func NPE_TimePredicate should be NPETimePredicate (golint)
    • Line 28: warning: don't use underscores in Go names; func NPE_UnsignedNumericPredicate should be NPEUnsignedNumericPredicate (golint)
    • Line 35: warning: don't use underscores in Go names; func NPE_NumericPredicate should be NPENumericPredicate (golint)
    • Line 42: warning: don't use underscores in Go names; func NPE_ValuePredicate should be NPEValuePredicate (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!


misspell98%

Misspell Finds commonly misspelled English words