Preparing report...

Report for github.com/biter777/countries

(v1.7.5)

A    Great!    Found 7 issues across 21 files

Tweet

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!


gofmt80%

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


gocyclo71%

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.

    • callcodes.go
    • Line 323: warning: cyclomatic complexity 252 of function (CallCode).Countries() is high (> 15) (gocyclo)
    • currencies.go
    • Line 1674: warning: cyclomatic complexity 172 of function CurrencyCodeByName() is high (> 15) (gocyclo)
    • Line 49: warning: cyclomatic complexity 171 of function (CurrencyCode).String() is high (> 15) (gocyclo)
    • Line 398: warning: cyclomatic complexity 171 of function (CurrencyCode).Alpha() is high (> 15) (gocyclo)
    • Line 1270: warning: cyclomatic complexity 170 of function (CurrencyCode).Digits() is high (> 15) (gocyclo)
    • Line 752: warning: cyclomatic complexity 168 of function (CurrencyCode).Countries() is high (> 15) (gocyclo)
    • domains.go
    • Line 26: warning: cyclomatic complexity 17 of function (DomainCode).String() is high (> 15) (gocyclo)
    • subdivisions.go
    • Line 9804: warning: cyclomatic complexity 4885 of function (SubdivisionCode).Country() is high (> 15) (gocyclo)
    • Line 27: warning: cyclomatic complexity 4885 of function (SubdivisionCode).String() is high (> 15) (gocyclo)
    • Line 19596: warning: cyclomatic complexity 4885 of function (SubdivisionCode).SubdivisionType() is high (> 15) (gocyclo)
    • countries.go
    • Line 5480: warning: cyclomatic complexity 268 of function ByName() is high (> 15) (gocyclo)
    • Line 1773: warning: cyclomatic complexity 265 of function (CountryCode).Alpha2() is high (> 15) (gocyclo)
    • Line 3835: warning: cyclomatic complexity 265 of function (CountryCode).CallCodes() is high (> 15) (gocyclo)
    • Line 699: warning: cyclomatic complexity 265 of function (CountryCode).StringRus() is high (> 15) (gocyclo)
    • Line 1236: warning: cyclomatic complexity 265 of function (CountryCode).FIPS() is high (> 15) (gocyclo)
    • Line 2310: warning: cyclomatic complexity 265 of function (CountryCode).Alpha3() is high (> 15) (gocyclo)
    • Line 162: warning: cyclomatic complexity 265 of function (CountryCode).String() is high (> 15) (gocyclo)
    • Line 4900: warning: cyclomatic complexity 254 of function (CountryCode).Capital() is high (> 15) (gocyclo)
    • Line 4382: warning: cyclomatic complexity 254 of function (CountryCode).Region() is high (> 15) (gocyclo)
    • Line 3059: warning: cyclomatic complexity 245 of function (CountryCode).Currency() is high (> 15) (gocyclo)
    • Line 2870: warning: cyclomatic complexity 91 of function (CountryCode).IOC() is high (> 15) (gocyclo)
    • capitals.go
    • Line 537: warning: cyclomatic complexity 253 of function (CapitalCode).Country() is high (> 15) (gocyclo)
    • Line 25: warning: cyclomatic complexity 253 of function (CapitalCode).String() is high (> 15) (gocyclo)
    • Line 1358: warning: cyclomatic complexity 247 of function CapitalCodeByName() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell85%

Misspell Finds commonly misspelled English words

    • countries.go
    • Line 5482: warning: "AUSTRALIEN" is a misspelling of "AUSTRALIAN" (misspell)
    • Line 5560: warning: "ADN" is a misspelling of "AND" (misspell)
    • Line 5564: warning: "VENEZUELLA" is a misspelling of "VENEZUELA" (misspell)
    • Line 5632: warning: "INDONESIEN" is a misspelling of "INDONESIAN" (misspell)
    • Line 5812: warning: "PALESTINA" is a misspelling of "PALESTINIAN" (misspell)
    • Line 5858: warning: "SINGPAORE" is a misspelling of "SINGAPORE" (misspell)
    • Line 5916: warning: "PHILIPINES" is a misspelling of "PHILIPPINES" (misspell)