Preparing report...

Report for github.com/kiegroup/kie-cloud-operator

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


gocyclo88%

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.

    • kie-cloud-operator/pkg/controller/kieapp/defaults/defaults.go
    • Line 43: warning: cyclomatic complexity 35 of function GetEnvironment() is high (> 15) (gocyclo)
    • Line 735: warning: cyclomatic complexity 30 of function getServersConfig() is high (> 15) (gocyclo)
    • Line 387: warning: cyclomatic complexity 24 of function getConsoleTemplate() is high (> 15) (gocyclo)
    • Line 1351: warning: cyclomatic complexity 22 of function SetDefaults() is high (> 15) (gocyclo)
    • Line 1940: warning: cyclomatic complexity 18 of function getCORSConfig() is high (> 15) (gocyclo)

golint79%

Golint is a linter for Go source code.

    • kie-cloud-operator/pkg/components/components.go
    • Line 25: warning: exported var Verbs should have comment or be unexported (golint)
    • Line 36: warning: exported function GetDeployment should have comment or be unexported (golint)
    • Line 176: warning: exported function GetRole should have comment or be unexported (golint)
    • Line 306: warning: exported function GetClusterRole should have comment or be unexported (golint)
    • kie-cloud-operator/pkg/controller/kieapp/constants/constants.go
    • Line 175: warning: exported const KubeLabels should have comment (or a comment on this block) or be unexported (golint)
    • Line 246: warning: comment on exported const ConsoleProdCPULimit should be of the form "ConsoleProdCPULimit ..." (golint)
    • Line 276: warning: comment on exported const RhpamSmartRouterImageName should be of the form "RhpamSmartRouterImageName ..." (golint)
    • Line 295: warning: exported var OseCli4ImageURL should have comment or be unexported (golint)
    • Line 369: warning: exported var Images should have comment or be unexported (golint)
    • Line 432: warning: exported type ImageEnv should have comment or be unexported (golint)
    • Line 438: warning: exported type ImageRef should have comment or be unexported (golint)
    • Line 442: warning: exported type ImageRefSpec should have comment or be unexported (golint)
    • Line 445: warning: exported type ImageRefTag should have comment or be unexported (golint)
    • kie-cloud-operator/pkg/controller/kieapp/test/mock_service.go
    • Line 25: warning: exported type MockPlatformService should have comment or be unexported (golint)
    • Line 41: warning: exported function MockService should have comment or be unexported (golint)
    • Line 91: warning: exported function MockServiceWithExtraScheme should have comment or be unexported (golint)
    • Line 143: warning: exported method MockPlatformService.Create should have comment or be unexported (golint)
    • Line 147: warning: exported method MockPlatformService.Delete should have comment or be unexported (golint)
    • Line 151: warning: exported method MockPlatformService.Get should have comment or be unexported (golint)
    • Line 155: warning: exported method MockPlatformService.List should have comment or be unexported (golint)
    • Line 159: warning: exported method MockPlatformService.Update should have comment or be unexported (golint)
    • Line 163: warning: exported method MockPlatformService.Patch should have comment or be unexported (golint)
    • Line 167: warning: exported method MockPlatformService.DeleteAllOf should have comment or be unexported (golint)
    • Line 171: warning: exported method MockPlatformService.GetCached should have comment or be unexported (golint)
    • Line 175: warning: exported method MockPlatformService.ImageStreamTags should have comment or be unexported (golint)
    • Line 179: warning: exported method MockPlatformService.GetScheme should have comment or be unexported (golint)
    • Line 183: warning: exported method MockPlatformService.Status should have comment or be unexported (golint)
    • Line 187: warning: exported method MockPlatformService.IsMockService should have comment or be unexported (golint)
    • kie-cloud-operator/pkg/controller/kieapp/shared/utils.go
    • Line 58: warning: exported function IsValidKeyStoreSecret should have comment or be unexported (golint)
    • Line 65: warning: exported function IsValidKeyStore should have comment or be unexported (golint)
    • Line 144: warning: exported function IsValidTruststoreSecret should have comment or be unexported (golint)
    • Line 151: warning: exported function IsValidTruststore should have comment or be unexported (golint)
    • Line 265: warning: exported function EnvVarSet should have comment or be unexported (golint)
    • Line 302: warning: exported function GetNamespacedName should have comment or be unexported (golint)
    • Line 309: warning: exported function Find should have comment or be unexported (golint)
    • kie-cloud-operator/pkg/apis/app/v2/kieapp_types.go
    • Line 435: warning: comment on exported type LoginModuleType should be of the form "LoginModuleType ..." (with optional leading article) (golint)
    • Line 584: warning: exported type Environment should have comment or be unexported (golint)
    • Line 594: warning: exported type CustomObject should have comment or be unexported (golint)
    • Line 610: warning: exported type OpenShiftObject should have comment or be unexported (golint)
    • Line 615: warning: exported type EnvTemplate should have comment or be unexported (golint)
    • Line 784: warning: exported type KieServerDataSetOrTemplate should have comment or be unexported (golint)
    • Line 1042: warning: comment on exported type CORSFiltersObject should be of the form "CORSFiltersObject ..." (with optional leading article) (golint)
    • kie-cloud-operator/pkg/controller/kieapp/test/mock_imagestreamtag.go
    • Line 11: warning: exported type MockImageStreamTag should have comment or be unexported (golint)
    • Line 15: warning: exported method MockImageStreamTag.Create should have comment or be unexported (golint)
    • Line 24: warning: exported method MockImageStreamTag.Update should have comment or be unexported (golint)
    • Line 34: warning: exported method MockImageStreamTag.Delete should have comment or be unexported (golint)
    • Line 42: warning: exported method MockImageStreamTag.Get should have comment or be unexported (golint)
    • Line 49: warning: exported method MockImageStreamTag.List should have comment or be unexported (golint)
    • kie-cloud-operator/pkg/ui/serve.go
    • Line 80: warning: exported type CustomResourceDefinition should have comment or be unexported (golint)
    • Line 84: warning: exported type CustomResourceDefinitionSpec should have comment or be unexported (golint)
    • Line 89: warning: exported type CustomResourceDefinitionVersion should have comment or be unexported (golint)
    • Line 94: warning: exported type CustomResourceDefinitionValidation should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign0%

IneffAssign detects ineffectual assignments in Go code.

An error occurred while running this test (exit status 2)


misspell97%

Misspell Finds commonly misspelled English words