Preparing report...

Report for github.com/paulmach/osm

(v0.7.1)

A+    Excellent!    Found 22 issues across 108 files

Tweet

gofmt93%

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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo84%

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.

    • annotate/change_test.go
    • Line 106: warning: cyclomatic complexity 33 of function TestChange_modify() is high (> 15) (gocyclo)
    • Line 295: warning: cyclomatic complexity 25 of function TestChange_delete() is high (> 15) (gocyclo)
    • Line 10: warning: cyclomatic complexity 16 of function TestChange_create() is high (> 15) (gocyclo)
    • osmgeojson/convert.go
    • Line 35: warning: cyclomatic complexity 27 of function Convert() is high (> 15) (gocyclo)
    • Line 303: warning: cyclomatic complexity 22 of function (*context).addMetaProperties() is high (> 15) (gocyclo)
    • annotate/edgecases_test.go
    • Line 11: warning: cyclomatic complexity 26 of function TestEdgeCase_childCreatedAfterParent() is high (> 15) (gocyclo)
    • Line 185: warning: cyclomatic complexity 25 of function TestEdgeCase_nodeRedacted() is high (> 15) (gocyclo)
    • note_test.go
    • Line 12: warning: cyclomatic complexity 23 of function TestNote_UnmarshalXML() is high (> 15) (gocyclo)
    • osm_test.go
    • Line 178: warning: cyclomatic complexity 16 of function TestOSM_UnmarshalJSON() is high (> 15) (gocyclo)
    • osmpbf/decode_data.go
    • Line 505: warning: cyclomatic complexity 42 of function (*dataDecoder).scanWays() is high (> 15) (gocyclo)
    • Line 713: warning: cyclomatic complexity 34 of function (*dataDecoder).scanRelations() is high (> 15) (gocyclo)
    • Line 226: warning: cyclomatic complexity 30 of function (*dataDecoder).scanDenseNodes() is high (> 15) (gocyclo)
    • Line 359: warning: cyclomatic complexity 28 of function (*dataDecoder).extractDenseNodes() is high (> 15) (gocyclo)
    • Line 148: warning: cyclomatic complexity 19 of function (*dataDecoder).scanPrimitiveGroup() is high (> 15) (gocyclo)
    • Line 66: warning: cyclomatic complexity 19 of function (*dataDecoder).scanPrimitiveBlock() is high (> 15) (gocyclo)
    • user_test.go
    • Line 12: warning: cyclomatic complexity 21 of function TestUser_UnmarshalXML() is high (> 15) (gocyclo)
    • osmpbf/scanner_test.go
    • Line 176: warning: cyclomatic complexity 20 of function TestScanner_FullyScannedBytes() is high (> 15) (gocyclo)
    • Line 279: warning: cyclomatic complexity 18 of function TestScanner_FilterNodes() is high (> 15) (gocyclo)
    • change_test.go
    • Line 31: warning: cyclomatic complexity 18 of function TestChange() is high (> 15) (gocyclo)
    • diff.go
    • Line 29: warning: cyclomatic complexity 16 of function (*Action).UnmarshalXML() is high (> 15) (gocyclo)
    • osm.go
    • Line 289: warning: cyclomatic complexity 16 of function (*OSM).UnmarshalJSON() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!