Preparing report...

Report for github.com/nullstyle/go

A+    Excellent!    Found 41 issues across 77 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!


gocyclo96%

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/sci/parse/unit/parser.peg.go
    • Line 499: warning: cyclomatic complexity 65 of function (*Parser).Init() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 18 of function (*tokens32).PreOrder() is high (> 15) (gocyclo)

golint84%

Golint is a linter for Go source code.

    • go/sci/parse/unit/parser.peg.go
    • Line 20: warning: don't use underscores in Go names; const ruleinverted_units should be ruleinvertedUnits (golint)
    • Line 22: warning: don't use underscores in Go names; const ruleparens_exp should be ruleparensExp (golint)
    • Line 26: warning: don't use underscores in Go names; const ruleref_exp should be rulerefExp (golint)
    • Line 388: warning: exported type Parser should have comment or be unexported (golint)
    • Line 462: warning: exported method Parser.PrintSyntaxTree should have comment or be unexported (golint)
    • Line 466: warning: exported method Parser.Highlighter should have comment or be unexported (golint)
    • Line 470: warning: exported method Parser.Execute should have comment or be unexported (golint)
    • Line 499: warning: exported method Parser.Init should have comment or be unexported (golint)
    • go/gopherjs/mithril/main.go
    • Line 94: warning: comment on exported function RouteMode should be of the form "RouteMode ..." (golint)
    • Line 116: warning: exported function RouteParam should have comment or be unexported (golint)
    • Line 120: warning: exported function RouteConfig should have comment or be unexported (golint)
    • Line 164: warning: comment on exported function Request should be of the form "Request ..." (golint)
    • go/gopherjs/mithril/mtest/output.go
    • Line 5: warning: exported method Output.Contains should have comment or be unexported (golint)
    • Line 14: warning: exported method Output.Find should have comment or be unexported (golint)
    • Line 18: warning: exported method Output.First should have comment or be unexported (golint)
    • go/env/main.go
    • Line 1: warning: package comment should be of the form "Package env ..." (golint)
    • Line 18: warning: exported var DefaultBackend should have comment or be unexported (golint)
    • Line 36: warning: exported type NotOnGoPathError should have comment or be unexported (golint)
    • go/sci/parse/unit/main.go
    • Line 7: warning: exported type U should have comment or be unexported (golint)
    • Line 11: warning: exported type Div should have comment or be unexported (golint)
    • Line 16: warning: exported type Exp should have comment or be unexported (golint)
    • Line 28: warning: exported type Ref should have comment or be unexported (golint)
    • Line 32: warning: exported type Mul should have comment or be unexported (golint)
    • Line 34: warning: exported type Nil should have comment or be unexported (golint)
    • go/sci/parse/value/parser.peg.go
    • Line 21: warning: don't use underscores in Go names; const rulefloat_exp should be rulefloatExp (golint)
    • Line 23: warning: don't use underscores in Go names; const ruleint_exp should be ruleintExp (golint)
    • Line 27: warning: don't use underscores in Go names; const rulenot_zero should be rulenotZero (golint)
    • Line 372: warning: exported type Parser should have comment or be unexported (golint)
    • Line 444: warning: exported method Parser.PrintSyntaxTree should have comment or be unexported (golint)
    • Line 448: warning: exported method Parser.Highlighter should have comment or be unexported (golint)
    • Line 452: warning: exported method Parser.Execute should have comment or be unexported (golint)
    • Line 474: warning: exported method Parser.Init should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign54%

IneffAssign detects ineffectual assignments in Go code.

    • go/env/main.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/nullstyle/go/gopath (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/spf13/afero (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/nullstyle/go/gopath (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/spf13/afero (invalid package name: "") (ineffassign)
    • go/tools/go-electron/cmd/internal.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/nullstyle/go/electron/build (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/nullstyle/go/gopherjs (invalid package name: "") (ineffassign)
    • go/sci/parse/main.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/nullstyle/go/sci/parse/unit (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/nullstyle/go/sci/parse/value (invalid package name: "") (ineffassign)
    • go/sci/systems/si/main.go
    • Line 3: warning: cannot find package "." in: (ineffassign)
    • Line 3: warning: could not import github.com/nullstyle/go/sci (invalid package name: "") (ineffassign)
    • go/gopherjs/main.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/nullstyle/go/env (invalid package name: "") (ineffassign)
    • go/sci/system_test.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/stretchr/testify/require (invalid package name: "") (ineffassign)
    • go/sci/eval_unit.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/nullstyle/go/sci/parse/unit (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/nullstyle/go/sci/parse/unit (invalid package name: "") (ineffassign)
    • go/tools/gopm/cmd/build.go
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: could not import github.com/nullstyle/go/env (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/spf13/afero (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/spf13/cobra (invalid package name: "") (ineffassign)
    • go/sci/system.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/gedex/inflector (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/nullstyle/go/sci/parse (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/gedex/inflector (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/nullstyle/go/sci/parse (invalid package name: "") (ineffassign)
    • go/test/main.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/spf13/afero (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/stretchr/testify/require (invalid package name: "") (ineffassign)
    • go/sci/base_unit_test.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/stretchr/testify/assert (invalid package name: "") (ineffassign)
    • go/env/main_test.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/nullstyle/go/test (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/stretchr/testify/assert (invalid package name: "") (ineffassign)
    • go/tools/gopm/main.go
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: could not import github.com/nullstyle/go/tools/gopm/cmd (invalid package name: "") (ineffassign)
    • go/gopherjs/mithril/main.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/gopherjs/gopherjs/js (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/nullstyle/go/gopherjs/module (invalid package name: "") (ineffassign)
    • Line 144: warning: elem declared but not used (ineffassign)
    • go/sci/examples/main_test.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/nullstyle/go/sci (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/nullstyle/go/sci/systems/si (invalid package name: "") (ineffassign)
    • go/electron/build/main.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/nullstyle/go/env (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/nullstyle/go/gopherjs (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/spf13/afero (invalid package name: "") (ineffassign)
    • Line 62: warning: undeclared name: AssetInfo (ineffassign)
    • Line 73: warning: undeclared name: Asset (ineffassign)
    • Line 98: warning: undeclared name: AssetDir (ineffassign)
    • go/tools/go-electron/main.go
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: could not import github.com/nullstyle/go/tools/go-electron/cmd (invalid package name: "") (ineffassign)
    • go/sci/systems/uscs/main.go
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: could not import github.com/nullstyle/go/sci (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/nullstyle/go/sci (invalid package name: "") (ineffassign)
    • go/gopherjs/mithril/mtest/output.go
    • Line 6: warning: o.Call undefined (type *Output has no field or method Call) (ineffassign)
    • Line 11: warning: o.Call undefined (type *Output has no field or method Call) (ineffassign)
    • Line 15: warning: o.Call undefined (type *Output has no field or method Call) (ineffassign)
    • Line 19: warning: o.Call undefined (type *Output has no field or method Call) (ineffassign)
    • go/electron/internal.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/gopherjs/gopherjs/js (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/nullstyle/go/gopherjs/module (invalid package name: "") (ineffassign)
    • go/env/internal_test.go
    • Line 3: warning: cannot find package "." in: (ineffassign)
    • Line 3: warning: could not import github.com/nullstyle/go/env/mocks (invalid package name: "") (ineffassign)
    • go/gopath/main_test.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/stretchr/testify/assert (invalid package name: "") (ineffassign)
    • go/apps/electron-example/main.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/gopherjs/gopherjs/js (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/nullstyle/go/electron (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/nullstyle/go/gopherjs/module (invalid package name: "") (ineffassign)
    • go/env/mocks/Backend.go
    • Line 3: warning: cannot find package "." in: (ineffassign)
    • Line 3: warning: could not import github.com/stretchr/testify/mock (invalid package name: "") (ineffassign)
    • Line 12: warning: _m.Called undefined (type *Backend has no field or method Called) (ineffassign)
    • Line 26: warning: _m.Called undefined (type *Backend has no field or method Called) (ineffassign)
    • Line 47: warning: _m.Called undefined (type *Backend has no field or method Called) (ineffassign)
    • go/apps/electron-example/browser/main.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/gopherjs/gopherjs/js (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/nullstyle/go/gopherjs/mithril (invalid package name: "") (ineffassign)
    • go/gopherjs/module/main.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/gopherjs/gopherjs/js (invalid package name: "") (ineffassign)
    • go/gopherjs/mithril/mtest/main.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/gopherjs/gopherjs/js (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/nullstyle/go/gopherjs/module (invalid package name: "") (ineffassign)

misspell98%

Misspell Finds commonly misspelled English words