Preparing report...

Report for github.com/alexflint/go-restructure

A    Great!    Found 14 issues across 17 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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.

    • go-restructure/regex/machine.go
    • Line 207: warning: cyclomatic complexity 22 of function (*machine).step() is high (> 15) (gocyclo)
    • Line 121: warning: cyclomatic complexity 20 of function (*machine).match() is high (> 15) (gocyclo)
    • Line 267: warning: cyclomatic complexity 16 of function (*machine).add() is high (> 15) (gocyclo)

golint47%

Golint is a linter for Go source code.

    • go-restructure/samples/quaternion-in-json/quaternion-in-json.go
    • Line 12: warning: exported type RealPart should have comment or be unexported (golint)
    • Line 17: warning: exported type SignedInt should have comment or be unexported (golint)
    • Line 22: warning: exported type IPart should have comment or be unexported (golint)
    • Line 27: warning: exported type JPart should have comment or be unexported (golint)
    • Line 32: warning: exported type KPart should have comment or be unexported (golint)
    • Line 37: warning: comment on exported type Quaternion should be of the form "Quaternion ..." (with optional leading article) (golint)
    • Line 45: warning: comment on exported type QuotedQuaternion should be of the form "QuotedQuaternion ..." (with optional leading article) (golint)
    • Line 54: warning: exported method QuotedQuaternion.UnmarshalJSON should have comment or be unexported (golint)
    • Line 61: warning: comment on exported type Var should be of the form "Var ..." (with optional leading article) (golint)
    • go-restructure/regex/onepass.go
    • Line 240: warning: don't use underscores in Go names; var p_A_Other should be pAOther (golint)
    • Line 241: warning: don't use underscores in Go names; var p_A_Alt should be pAAlt (golint)
    • Line 259: warning: don't use underscores in Go names; var p_B_Alt should be pBAlt (golint)
    • Line 260: warning: don't use underscores in Go names; var p_B_Other should be pBOther (golint)
    • go-restructure/samples/floating-point/floating-point.go
    • Line 12: warning: comment on exported type Float should be of the form "Float ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported type Sign should be of the form "Sign ..." (with optional leading article) (golint)
    • Line 26: warning: comment on exported type Exponent should be of the form "Exponent ..." (with optional leading article) (golint)
    • go-restructure/samples/find-all-floats/find-all-floats.go
    • Line 30: warning: comment on exported type Float should be of the form "Float ..." (with optional leading article) (golint)
    • Line 41: warning: comment on exported type Sign should be of the form "Sign ..." (with optional leading article) (golint)
    • Line 46: warning: comment on exported type Exponent should be of the form "Exponent ..." (with optional leading article) (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign35%

IneffAssign detects ineffectual assignments in Go code.

    • go-restructure/samples/floating-point/floating-point.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/alexflint/go-restructure (invalid package name: "") (ineffassign)
    • Line 10: warning: undeclared name: restructure (ineffassign)
    • Line 10: warning: undeclared name: restructure (ineffassign)
    • Line 7: warning: "github.com/alexflint/go-restructure" imported but not used (ineffassign)
    • go-restructure/samples/name-dot-name/name-dot-name.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/alexflint/go-arg (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/alexflint/go-restructure (invalid package name: "") (ineffassign)
    • Line 36: warning: undeclared name: arg (ineffassign)
    • Line 39: warning: undeclared name: restructure (ineffassign)
    • Line 39: warning: undeclared name: restructure (ineffassign)
    • Line 8: warning: "github.com/alexflint/go-arg" imported but not used (ineffassign)
    • Line 9: warning: "github.com/alexflint/go-restructure" imported but not used (ineffassign)
    • go-restructure/restructure_test.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/stretchr/testify/assert (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/stretchr/testify/require (invalid package name: "") (ineffassign)
    • go-restructure/samples/python-import/python-import.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/alexflint/go-restructure (invalid package name: "") (ineffassign)
    • Line 9: warning: undeclared name: restructure (ineffassign)
    • Line 14: warning: undeclared name: restructure (ineffassign)
    • Line 22: warning: undeclared name: restructure (ineffassign)
    • Line 9: warning: undeclared name: restructure (ineffassign)
    • Line 6: warning: "github.com/alexflint/go-restructure" imported but not used (ineffassign)
    • go-restructure/restructure.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/alexflint/go-restructure/regex (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/alexflint/go-restructure/regex (invalid package name: "") (ineffassign)
    • go-restructure/samples/find-all-floats/find-all-floats.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/alexflint/go-restructure (invalid package name: "") (ineffassign)
    • Line 28: warning: undeclared name: restructure (ineffassign)
    • Line 32: warning: undeclared name: restructure (ineffassign)
    • Line 38: warning: undeclared name: restructure (ineffassign)
    • Line 28: warning: undeclared name: restructure (ineffassign)
    • Line 6: warning: "github.com/alexflint/go-restructure" imported but not used (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!