Preparing report...

Report for github.com/softonic/rate-limit-operator

B    Not bad!    Found 12 issues across 17 files

Tweet

gofmt58%

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


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!


gocyclo100%

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.

No problems detected. Good job!


golint35%

Golint is a linter for Go source code.

    • rate-limit-operator/pkg/log/level.go
    • Line 5: warning: exported const WARNING should have comment or be unexported (golint)
    • Line 6: warning: exported const NOTICE should have comment or be unexported (golint)
    • Line 7: warning: exported const INFO should have comment or be unexported (golint)
    • Line 8: warning: exported const EXTENDED should have comment or be unexported (golint)
    • Line 9: warning: exported const DEBUG should have comment or be unexported (golint)
    • Line 10: warning: exported const TRACE should have comment or be unexported (golint)
    • rate-limit-operator/api/istio_v1alpha3/envoyfilter_types.go
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 32: warning: exported type WorkloadSelector should have comment or be unexported (golint)
    • Line 40: warning: exported type ApplyTo should have comment or be unexported (golint)
    • Line 42: warning: exported type PatchContext should have comment or be unexported (golint)
    • Line 44: warning: exported type ProxyMatch should have comment or be unexported (golint)
    • Line 49: warning: don't use underscores in Go names; type ListenerMatch_SubFilterMatch should be ListenerMatchSubFilterMatch (golint)
    • Line 49: warning: exported type ListenerMatch_SubFilterMatch should have comment or be unexported (golint)
    • Line 54: warning: don't use underscores in Go names; type ListenerMatch_FilterMatch should be ListenerMatchFilterMatch (golint)
    • Line 54: warning: exported type ListenerMatch_FilterMatch should have comment or be unexported (golint)
    • Line 65: warning: don't use underscores in Go names; type ListenerMatch_FilterChainMatch should be ListenerMatchFilterChainMatch (golint)
    • Line 65: warning: exported type ListenerMatch_FilterChainMatch should have comment or be unexported (golint)
    • Line 97: warning: exported type ListenerMatch should have comment or be unexported (golint)
    • Line 119: warning: don't use underscores in Go names; type EnvoyConfigObjectMatch_Listener should be EnvoyConfigObjectMatchListener (golint)
    • Line 119: warning: exported type EnvoyConfigObjectMatch_Listener should have comment or be unexported (golint)
    • Line 123: warning: exported type ClusterMatch should have comment or be unexported (golint)
    • Line 142: warning: don't use underscores in Go names; type RouteConfigurationMatch_RouteMatch_Action should be RouteConfigurationMatchRouteMatchAction (golint)
    • Line 142: warning: exported type RouteConfigurationMatch_RouteMatch_Action should have comment or be unexported (golint)
    • Line 144: warning: don't use underscores in Go names; type RouteConfigurationMatch_RouteMatch should be RouteConfigurationMatchRouteMatch (golint)
    • Line 144: warning: exported type RouteConfigurationMatch_RouteMatch should have comment or be unexported (golint)
    • Line 154: warning: don't use underscores in Go names; type RouteConfigurationMatch_VirtualHostMatch should be RouteConfigurationMatchVirtualHostMatch (golint)
    • Line 154: warning: exported type RouteConfigurationMatch_VirtualHostMatch should have comment or be unexported (golint)
    • Line 164: warning: exported type RouteConfigurationMatch should have comment or be unexported (golint)
    • Line 188: warning: exported type RouteConfiguration should have comment or be unexported (golint)
    • Line 192: warning: exported type EnvoyConfigObjectMatch should have comment or be unexported (golint)
    • Line 207: warning: don't use underscores in Go names; type Patch_Operation should be PatchOperation (golint)
    • Line 207: warning: exported type Patch_Operation should have comment or be unexported (golint)
    • Line 209: warning: don't use underscores in Go names; type Patch_FilterClass should be PatchFilterClass (golint)
    • Line 209: warning: exported type Patch_FilterClass should have comment or be unexported (golint)
    • Line 213: warning: exported type Patch should have comment or be unexported (golint)
    • Line 219: warning: exported type EnvoyConfigObjectPatch should have comment or be unexported (golint)
    • rate-limit-operator/controllers/ratelimit_controller.go
    • Line 29: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 34: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 52: warning: exported type K8sObject should have comment or be unexported (golint)
    • Line 70: warning: exported method RateLimitReconciler.Reconcile should have comment or be unexported (golint)
    • Line 148: warning: exported method RateLimitReconciler.SetupWithManager should have comment or be unexported (golint)
    • rate-limit-operator/api/v1alpha1/ratelimit_types.go
    • Line 24: warning: exported type OutputRatelimitsEnvoyFilter should have comment or be unexported (golint)
    • Line 28: warning: exported type RateLimits should have comment or be unexported (golint)
    • Line 32: warning: exported type RequestHeaders should have comment or be unexported (golint)
    • Line 37: warning: exported type Actions should have comment or be unexported (golint)
    • Line 42: warning: exported type DestinationClusterHeader should have comment or be unexported (golint)
    • Line 44: warning: exported type OutputConfig should have comment or be unexported (golint)
    • Line 48: warning: exported type RateLimitPerDescriptor should have comment or be unexported (golint)
    • Line 52: warning: exported type Descriptors should have comment or be unexported (golint)
    • Line 57: warning: exported type DescriptorsParent should have comment or be unexported (golint)
    • Line 63: warning: exported type RequestHeader should have comment or be unexported (golint)
    • Line 68: warning: exported type Dimensions should have comment or be unexported (golint)
    • Line 71: warning: exported type Rate should have comment or be unexported (golint)
    • Line 81: warning: exported type RateLimitSpec should have comment or be unexported (golint)
    • rate-limit-operator/controllers/actions.go
    • Line 51: warning: exported method RateLimitReconciler.CreateOrUpdateConfigMap should have comment or be unexported (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 101: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 189: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 249: warning: exported method RateLimitReconciler.UpdateDeployment should have comment or be unexported (golint)
    • Line 262: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign76%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!