Preparing report...

Report for github.com/pilinux/gorest

(v1.9.4)

A+    Excellent!    Found 12 issues across 97 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!


gocyclo87%

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.

    • config/config_test.go
    • Line 483: warning: cyclomatic complexity 90 of function TestConfigWithDifferentExpectedValueTypes() is high (> 15) (gocyclo)
    • Line 75: warning: cyclomatic complexity 23 of function TestGetConfig() is high (> 15) (gocyclo)
    • lib/middleware/jwt_test.go
    • Line 880: warning: cyclomatic complexity 57 of function TestValidateRefreshJWT() is high (> 15) (gocyclo)
    • Line 677: warning: cyclomatic complexity 57 of function TestValidateAccessJWT() is high (> 15) (gocyclo)
    • Line 19: warning: cyclomatic complexity 24 of function TestGetJWT() is high (> 15) (gocyclo)
    • handler/twoFA.go
    • Line 204: warning: cyclomatic complexity 28 of function Activate2FA() is high (> 15) (gocyclo)
    • Line 25: warning: cyclomatic complexity 23 of function Setup2FA() is high (> 15) (gocyclo)
    • Line 443: warning: cyclomatic complexity 21 of function Validate2FA() is high (> 15) (gocyclo)
    • Line 645: warning: cyclomatic complexity 20 of function Deactivate2FA() is high (> 15) (gocyclo)
    • Line 787: warning: cyclomatic complexity 17 of function CreateBackup2FA() is high (> 15) (gocyclo)
    • handler/auth.go
    • Line 188: warning: cyclomatic complexity 26 of function UpdateEmail() is high (> 15) (gocyclo)
    • Line 28: warning: cyclomatic complexity 19 of function CreateUserAuth() is high (> 15) (gocyclo)
    • lib/middleware/firewall.go
    • Line 26: warning: cyclomatic complexity 21 of function Firewall() is high (> 15) (gocyclo)
    • Line 97: warning: cyclomatic complexity 16 of function parseIPList() is high (> 15) (gocyclo)
    • config/config.go
    • Line 301: warning: cyclomatic complexity 44 of function security() is high (> 15) (gocyclo)
    • Line 638: warning: cyclomatic complexity 35 of function getParamsJWT() is high (> 15) (gocyclo)
    • handler/passwordReset.go
    • Line 78: warning: cyclomatic complexity 36 of function PasswordRecover() is high (> 15) (gocyclo)
    • Line 394: warning: cyclomatic complexity 21 of function PasswordUpdate() 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!