Preparing report...

Report for github.com/IncSW/geoip2

A+    Excellent!    Found 14 issues across 25 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!


gocyclo72%

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.

    • geoip2/reader_test.go
    • Line 156: warning: cyclomatic complexity 29 of function TestCountry() is high (> 15) (gocyclo)
    • Line 263: warning: cyclomatic complexity 24 of function TestEnterprise() is high (> 15) (gocyclo)
    • Line 63: warning: cyclomatic complexity 23 of function TestCity() is high (> 15) (gocyclo)

golint60%

Golint is a linter for Go source code.

    • geoip2/reader_asn.go
    • Line 10: warning: exported type ASNReader should have comment or be unexported (golint)
    • Line 14: warning: exported method ASNReader.Lookup should have comment or be unexported (golint)
    • Line 52: warning: exported function NewASNReader should have comment or be unexported (golint)
    • Line 65: warning: exported function NewASNReaderFromFile should have comment or be unexported (golint)
    • geoip2/reader_connection_type.go
    • Line 10: warning: exported type ConnectionTypeReader should have comment or be unexported (golint)
    • Line 14: warning: exported method ConnectionTypeReader.Lookup should have comment or be unexported (golint)
    • Line 52: warning: exported function NewConnectionTypeReader should have comment or be unexported (golint)
    • Line 65: warning: exported function NewConnectionTypeReaderFromFile should have comment or be unexported (golint)
    • geoip2/reader_isp.go
    • Line 10: warning: exported type ISPReader should have comment or be unexported (golint)
    • Line 14: warning: exported method ISPReader.Lookup should have comment or be unexported (golint)
    • Line 52: warning: exported function NewISPReader should have comment or be unexported (golint)
    • Line 65: warning: exported function NewISPReaderFromFile should have comment or be unexported (golint)
    • geoip2/reader_anonymous_ip.go
    • Line 10: warning: exported type AnonymousIPReader should have comment or be unexported (golint)
    • Line 14: warning: exported method AnonymousIPReader.Lookup should have comment or be unexported (golint)
    • Line 52: warning: exported function NewAnonymousIPReader should have comment or be unexported (golint)
    • Line 65: warning: exported function NewAnonymousIPReaderFromFile should have comment or be unexported (golint)
    • geoip2/reader_city.go
    • Line 10: warning: exported type CityReader should have comment or be unexported (golint)
    • Line 14: warning: exported method CityReader.Lookup should have comment or be unexported (golint)
    • Line 86: warning: exported function NewCityReader should have comment or be unexported (golint)
    • Line 101: warning: exported function NewCityReaderFromFile should have comment or be unexported (golint)
    • Line 109: warning: exported function NewEnterpriseReader should have comment or be unexported (golint)
    • Line 113: warning: exported function NewEnterpriseReaderFromFile should have comment or be unexported (golint)
    • geoip2/reader_country.go
    • Line 10: warning: exported type CountryReader should have comment or be unexported (golint)
    • Line 14: warning: exported method CountryReader.Lookup should have comment or be unexported (golint)
    • Line 66: warning: exported function NewCountryReader should have comment or be unexported (golint)
    • Line 80: warning: exported function NewCountryReaderFromFile should have comment or be unexported (golint)
    • geoip2/reader_domain.go
    • Line 10: warning: exported type DomainReader should have comment or be unexported (golint)
    • Line 14: warning: exported method DomainReader.Lookup should have comment or be unexported (golint)
    • Line 52: warning: exported function NewDomainReader should have comment or be unexported (golint)
    • Line 65: warning: exported function NewDomainReaderFromFile should have comment or be unexported (golint)
    • geoip2/types.go
    • Line 24: warning: exported type Continent should have comment or be unexported (golint)
    • Line 30: warning: exported type Country should have comment or be unexported (golint)
    • Line 39: warning: exported type Subdivision should have comment or be unexported (golint)
    • Line 46: warning: exported type City should have comment or be unexported (golint)
    • Line 52: warning: exported type Location should have comment or be unexported (golint)
    • Line 60: warning: exported type Postal should have comment or be unexported (golint)
    • Line 65: warning: exported type Traits should have comment or be unexported (golint)
    • Line 79: warning: exported type CountryResult should have comment or be unexported (golint)
    • Line 87: warning: exported type CityResult should have comment or be unexported (golint)
    • Line 99: warning: exported type ISP should have comment or be unexported (golint)
    • Line 106: warning: exported type ConnectionType should have comment or be unexported (golint)
    • Line 110: warning: exported type AnonymousIP should have comment or be unexported (golint)
    • Line 118: warning: exported type ASN should have comment or be unexported (golint)
    • Line 123: warning: exported type Domain should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!