Preparing report...

Report for github.com/natron-io/tenant-api

(v0.6.1)

A+    Excellent!    Found 10 issues across 18 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!


gocyclo94%

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.

    • util/os.go
    • Line 16: warning: cyclomatic complexity 30 of function LoadEnv() is high (> 15) (gocyclo)

golint44%

Golint is a linter for Go source code.

    • controllers/authController.go
    • Line 14: warning: comment on exported function GithubLogin should be of the form "GithubLogin ..." (golint)
    • Line 45: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 159: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • controllers/costController.go
    • Line 43: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 83: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 139: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 181: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 195: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • util/k8s.go
    • Line 13: warning: exported var Clientset should have comment or be unexported (golint)
    • Line 38: warning: exported function GetPVCsByTenantByStorageClass should have comment or be unexported (golint)
    • Line 202: warning: exported function GetStorageClassesInCluster should have comment or be unexported (golint)
    • util/os.go
    • Line 12: warning: exported var CORS should have comment or be unexported (golint)
    • util/slack.go
    • Line 10: warning: exported var SLACK_TOKEN should have comment or be unexported (golint)
    • controllers/tenantController.go
    • Line 51: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 121: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 153: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 185: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 217: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • util/auth.go
    • Line 13: warning: exported var CLIENT_ID should have comment or be unexported (golint)
    • util/costs.go
    • Line 9: warning: exported var CPU_COST should have comment or be unexported (golint)
    • Line 43: warning: comment on exported function GetIngressCostByDomain should be of the form "GetIngressCostByDomain ..." (golint)
    • Line 77: warning: exported function GetIngressCost should have comment or be unexported (golint)
    • util/log.go
    • Line 9: warning: exported var WarningLogger should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell94%

Misspell Finds commonly misspelled English words