Preparing report...

Report for github.com/api7/kong-to-apisix

A+    Excellent!    Found 11 issues across 15 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!


gocyclo93%

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.


golint26%

Golint is a linter for Go source code.

    • kong-to-apisix/pkg/kong/kong.go
    • Line 12: warning: exported var EnvKongYamlPath should have comment or be unexported (golint)
    • Line 14: warning: exported function Migrate should have comment or be unexported (golint)
    • Line 19: 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 25: 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 31: 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 37: 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 43: warning: exported function ReadYaml should have comment or be unexported (golint)
    • kong-to-apisix/pkg/kong/plugin_types.go
    • Line 3: warning: exported type ProxyCache should have comment or be unexported (golint)
    • Line 16: warning: exported type ProxyCacheMemory should have comment or be unexported (golint)
    • Line 20: warning: exported type RateLimiting should have comment or be unexported (golint)
    • Line 40: warning: exported type KeyAuth should have comment or be unexported (golint)
    • kong-to-apisix/pkg/kong/route.go
    • Line 10: warning: exported function MigrateRoute should have comment or be unexported (golint)
    • Line 74: 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)
    • kong-to-apisix/pkg/kong/types.go
    • Line 3: warning: exported type KongConfig should have comment or be unexported (golint)
    • Line 10: warning: exported type Routes should have comment or be unexported (golint)
    • Line 26: warning: exported type Services should have comment or be unexported (golint)
    • Line 40: warning: exported type Upstreams should have comment or be unexported (golint)
    • Line 42: warning: exported type Upstream should have comment or be unexported (golint)
    • Line 54: warning: exported type Targets should have comment or be unexported (golint)
    • Line 59: warning: exported type Healthchecks should have comment or be unexported (golint)
    • Line 95: warning: exported type Consumers should have comment or be unexported (golint)
    • Line 103: warning: exported type Plugins should have comment or be unexported (golint)
    • Line 105: warning: exported type Plugin should have comment or be unexported (golint)
    • kong-to-apisix/pkg/utils/utils.go
    • Line 12: warning: comment on exported var WordMap should be of the form "WordMap ..." (golint)
    • Line 17: warning: exported var ConfigFilePath should have comment or be unexported (golint)
    • Line 20: warning: exported function AddValueToYaml should have comment or be unexported (golint)
    • kong-to-apisix/pkg/kong/globalrules.go
    • Line 9: warning: comment on exported function MigrateGlobalRules should be of the form "MigrateGlobalRules ..." (golint)
    • Line 21: 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)

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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!