Preparing report...

Report for github.com/openebs/cstor-operators

A+    Excellent!    Found 76 issues across 260 files

Tweet

gofmt95%

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!


gocyclo96%

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.


golint81%

Golint is a linter for Go source code.

    • cstor-operators/pkg/volumereplica/volumereplica.go
    • Line 393: warning: exported function SetTargetIp should have comment or be unexported (golint)
    • Line 405: warning: exported function GetTargetIp should have comment or be unexported (golint)
    • Line 833: warning: should omit 2nd value from range; this loop is equivalent to `for snapName := range ...` (golint)
    • Line 899: warning: should omit 2nd value from range; this loop is equivalent to `for snapName := range ...` (golint)
    • Line 926: warning: should omit 2nd value from range; this loop is equivalent to `for snapName := range ...` (golint)
    • Line 943: warning: should omit 2nd value from range; this loop is equivalent to `for snapName := range ...` (golint)
    • Line 951: warning: should omit 2nd value from range; this loop is equivalent to `for snapName := range ...` (golint)
    • cstor-operators/tests/pkg/k8sclient/cspc_util.go
    • Line 20: warning: should not use dot imports (golint)
    • Line 34: warning: comment on exported method Client.GetOnlineCSPICountEventually should be of the form "GetOnlineCSPICountEventually ..." (golint)
    • Line 181: warning: comment on exported method Client.GetCSPC should be of the form "GetCSPC ..." (golint)
    • cstor-operators/pkg/controllers/cspc-controller/controller.go
    • Line 99: warning: comment on exported method ControllerBuilder.WithKubeClient should be of the form "WithKubeClient ..." (golint)
    • Line 105: warning: comment on exported method ControllerBuilder.WithOpenEBSClient should be of the form "WithOpenEBSClient ..." (golint)
    • Line 111: warning: comment on exported method ControllerBuilder.WithCSPCLister should be of the form "WithCSPCLister ..." (golint)
    • Line 125: warning: comment on exported method ControllerBuilder.WithCSPCSynced should be of the form "WithCSPCSynced ..." (golint)
    • Line 139: warning: comment on exported method ControllerBuilder.WithWorkqueueRateLimiting should be of the form "WithWorkqueueRateLimiting ..." (golint)
    • Line 145: warning: comment on exported method ControllerBuilder.WithRecorder should be of the form "WithRecorder ..." (golint)
    • Line 156: warning: comment on exported method ControllerBuilder.WithEventHandler should be of the form "WithEventHandler ..." (golint)
    • Line 239: warning: exported function GetVersionedCSPCInterface should have comment or be unexported (golint)
    • Line 243: warning: exported function GetStoredCSPIVersionInterface should have comment or be unexported (golint)
    • Line 247: warning: exported method Controller.GetStoredCStorVersionClient should have comment or be unexported (golint)
    • Line 251: warning: exported method Controller.GetStoredOpenebsVersionClient should have comment or be unexported (golint)
    • cstor-operators/pkg/cspc/algorithm/build_csp.go
    • Line 31: warning: exported const ApiVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: comment on exported method Config.GetCSPISpec should be of the form "GetCSPISpec ..." (golint)
    • Line 106: warning: exported function GetCSPCOwnerReference should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell89%

Misspell Finds commonly misspelled English words

    • cstor-operators/tests/pkg/k8sclient/cv_util.go
    • Line 54: warning: "requirment" is a misspelling of "requirement" (misspell)
    • Line 74: warning: "requirment" is a misspelling of "requirement" (misspell)
    • Line 100: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 135: warning: "untill" is a misspelling of "until" (misspell)
    • Line 172: warning: "propogate" is a misspelling of "propagate" (misspell)
    • Line 178: warning: "untill" is a misspelling of "until" (misspell)
    • Line 205: warning: "untill" is a misspelling of "until" (misspell)
    • Line 232: warning: "untill" is a misspelling of "until" (misspell)
    • Line 286: warning: "propogate" is a misspelling of "propagate" (misspell)
    • Line 293: warning: "untill" is a misspelling of "until" (misspell)