Preparing report...

Report for github.com/disaster37/monitoring-operator

(v0.0.0-20220104094942-6085589ac8b7)

A+    Excellent!    Found 15 issues across 36 files

Tweet

gofmt97%

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!


gocyclo91%

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.

    • pkg/centreonhandler/centreon_service.go
    • Line 173: warning: cyclomatic complexity 32 of function (*CentreonHandlerImpl).DiffService() is high (> 15) (gocyclo)
    • Line 84: warning: cyclomatic complexity 22 of function (*CentreonHandlerImpl).UpdateService() is high (> 15) (gocyclo)
    • Line 12: warning: cyclomatic complexity 18 of function (*CentreonHandlerImpl).CreateService() is high (> 15) (gocyclo)
    • controllers/ingresscentreon_controller.go
    • Line 271: warning: cyclomatic complexity 21 of function initIngressCentreonServiceFromAnnotations() is high (> 15) (gocyclo)
    • Line 70: warning: cyclomatic complexity 17 of function (*IngressCentreonReconciler).Reconcile() is high (> 15) (gocyclo)

golint72%

Golint is a linter for Go source code.

    • pkg/centreonhandler/centreon.go
    • Line 8: warning: exported type CentreonHandler should have comment or be unexported (golint)
    • Line 18: warning: exported type CentreonHandlerImpl should have comment or be unexported (golint)
    • Line 23: warning: exported function NewCentreonHandler should have comment or be unexported (golint)
    • Line 30: warning: exported method CentreonHandlerImpl.SetLogger should have comment or be unexported (golint)
    • controllers/centreonservice_service.go
    • Line 13: warning: exported type CentreonService should have comment or be unexported (golint)
    • Line 19: warning: exported type CentreonServiceImpl should have comment or be unexported (golint)
    • Line 24: warning: exported function NewCentreonService should have comment or be unexported (golint)
    • Line 31: warning: exported method CentreonServiceImpl.SetLogger should have comment or be unexported (golint)
    • Line 35: warning: exported method CentreonServiceImpl.Delete should have comment or be unexported (golint)
    • Line 49: warning: exported method CentreonServiceImpl.Reconcile should have comment or be unexported (golint)
    • pkg/helpers/convert.go
    • Line 8: warning: exported function BoolToString should have comment or be unexported (golint)
    • Line 24: warning: exported function StringToBool should have comment or be unexported (golint)
    • Line 36: warning: exported function StringToSlice should have comment or be unexported (golint)
    • Line 47: warning: exported function CheckArgumentsToString should have comment or be unexported (golint)
    • main.go
    • Line 47: warning: exported const MONITORING_CENTREON should have comment (or a comment on this block) or be unexported (golint)
    • api/v1alpha1/centreon_types.go
    • Line 37: warning: comment on exported type CentreonSpecEndpoint should be of the form "CentreonSpecEndpoint ..." (with optional leading article) (golint)
    • pkg/helpers/centreon.go
    • Line 20: warning: exported function GetCentreonConfig should have comment or be unexported (golint)
    • Line 61: warning: exported function GetOperatorNamespace should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell91%

Misspell Finds commonly misspelled English words