Preparing report...

Report for github.com/GannettDigital/jstransform

A+    Excellent!    Found 36 issues across 98 files

Tweet

gofmt97%

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!


gocyclo91%

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.

    • jstransform/generate/generate_test_data/pointers/pointers_msgp.go
    • Line 1995: warning: cyclomatic complexity 49 of function (*Simple).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 1654: warning: cyclomatic complexity 49 of function (*Simple).DecodeMsg() is high (> 15) (gocyclo)
    • Line 12: warning: cyclomatic complexity 37 of function (*Complex).DecodeMsg() is high (> 15) (gocyclo)
    • Line 292: warning: cyclomatic complexity 37 of function (*Complex).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 1424: warning: cyclomatic complexity 30 of function (*NestedFactCheckClaims).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 1211: warning: cyclomatic complexity 30 of function (*NestedFactCheckClaims).DecodeMsg() is high (> 15) (gocyclo)
    • Line 1817: warning: cyclomatic complexity 29 of function (*Simple).EncodeMsg() is high (> 15) (gocyclo)
    • Line 125: warning: cyclomatic complexity 25 of function (*Complex).EncodeMsg() is high (> 15) (gocyclo)
    • Line 872: warning: cyclomatic complexity 23 of function (*ComplexURL).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 714: warning: cyclomatic complexity 23 of function (*ComplexURL).DecodeMsg() is high (> 15) (gocyclo)
    • Line 1310: warning: cyclomatic complexity 18 of function (*NestedFactCheckClaims).EncodeMsg() is high (> 15) (gocyclo)
    • Line 416: warning: cyclomatic complexity 16 of function (*ComplexCrops).DecodeMsg() is high (> 15) (gocyclo)
    • Line 540: warning: cyclomatic complexity 16 of function (*ComplexCrops).UnmarshalMsg() is high (> 15) (gocyclo)
    • jstransform/generate/generate_test_data/rename/rename_msgp.go
    • Line 534: warning: cyclomatic complexity 67 of function (*ReallyComplex).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 12: warning: cyclomatic complexity 67 of function (*ReallyComplex).DecodeMsg() is high (> 15) (gocyclo)
    • Line 254: warning: cyclomatic complexity 41 of function (*ReallyComplex).EncodeMsg() is high (> 15) (gocyclo)
    • Line 787: warning: cyclomatic complexity 40 of function (*TotallySimple).DecodeMsg() is high (> 15) (gocyclo)
    • Line 1095: warning: cyclomatic complexity 40 of function (*TotallySimple).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 940: warning: cyclomatic complexity 23 of function (*TotallySimple).EncodeMsg() is high (> 15) (gocyclo)
    • jstransform/generate/generate_test_data/msgp/msgp_msgp.go
    • Line 534: warning: cyclomatic complexity 67 of function (*Complex).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 12: warning: cyclomatic complexity 67 of function (*Complex).DecodeMsg() is high (> 15) (gocyclo)
    • Line 254: warning: cyclomatic complexity 41 of function (*Complex).EncodeMsg() is high (> 15) (gocyclo)
    • Line 787: warning: cyclomatic complexity 40 of function (*Simple).DecodeMsg() is high (> 15) (gocyclo)
    • Line 1095: warning: cyclomatic complexity 40 of function (*Simple).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 940: warning: cyclomatic complexity 23 of function (*Simple).EncodeMsg() is high (> 15) (gocyclo)

golint75%

Golint is a linter for Go source code.

    • jstransform/generate/avro.go
    • Line 393: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 400: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • jstransform/generate/avro_test_data/timespointers_avro.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 65: warning: don't use underscores in Go names; var AppearanceURLs_recordSlice should be AppearanceURLsRecordSlice (golint)
    • Line 76: warning: don't use underscores in Go names; var FactCheckClaims_recordSlice should be FactCheckClaimsRecordSlice (golint)
    • jstransform/generate/avro_test_data/complex_avro.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 65: warning: don't use underscores in Go names; var Contributors_recordSlice should be ContributorsRecordSlice (golint)
    • Line 81: warning: don't use underscores in Go names; var Crops_recordSlice should be CropsRecordSlice (golint)
    • jstransform/generate/avro_test_data/nested_avro.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 65: warning: don't use underscores in Go names; var AppearanceURLs_recordSlice should be AppearanceURLsRecordSlice (golint)
    • Line 79: warning: don't use underscores in Go names; var FactCheckClaims_recordSlice should be FactCheckClaimsRecordSlice (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words