Preparing report...

Report for github.com/dell/csi-baremetal

(v1.0.0)

A+    Excellent!    Found 37 issues across 205 files

Tweet

gofmt96%

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.

    • pkg/node/volumemgr.go
    • Line 609: warning: cyclomatic complexity 23 of function (*VolumeManager).updateDrivesCRs() is high (> 15) (gocyclo)
    • Line 258: warning: cyclomatic complexity 23 of function (*VolumeManager).Reconcile() is high (> 15) (gocyclo)
    • Line 820: warning: cyclomatic complexity 19 of function (*VolumeManager).discoverLVGOnSystemDrive() is high (> 15) (gocyclo)
    • Line 949: warning: cyclomatic complexity 16 of function (*VolumeManager).handleDriveStatusChange() is high (> 15) (gocyclo)
    • pkg/node/node.go
    • Line 350: warning: cyclomatic complexity 23 of function (*CSINodeService).NodePublishVolume() is high (> 15) (gocyclo)
    • Line 145: warning: cyclomatic complexity 21 of function (*CSINodeService).NodeStageVolume() is high (> 15) (gocyclo)

golint89%

Golint is a linter for Go source code.

    • api/v1/drivecrd/drive_types.go
    • Line 61: warning: comment on exported method Drive.DeepCopyInto should be of the form "DeepCopyInto ..." (golint)
    • Line 73: warning: exported method Drive.Equals should have comment or be unexported (golint)
    • Line 85: warning: exported method Drive.GetDriveDescription should have comment or be unexported (golint)
    • test/e2e/scenarios/controller-node-fail.go
    • Line 25: warning: should not use dot imports (golint)
    • Line 39: warning: exported const ControllerName should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported function DefineControllerNodeFailTestSuite should have comment or be unexported (golint)
    • pkg/metrics/metrics.go
    • Line 28: warning: comment on exported var Branch should be of the form "Branch ..." (golint)
    • Line 30: warning: comment on exported var Revision should be of the form "Revision ..." (golint)
    • test/e2e/scenarios/setup.go
    • Line 17: warning: package comment should be of the form "Package scenarios ..." (golint)
    • Line 31: warning: exported var CSITestSuites should have comment or be unexported (golint)
    • test/e2e/scenarios/stress-test.go
    • Line 106: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 138: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • api/v1/constants.go
    • Line 20: warning: exported const VolumeKind should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: comment on exported const Creating should be of the form "Creating ..." (golint)
    • Line 43: warning: comment on exported const HealthUnknown should be of the form "HealthUnknown ..." (golint)
    • Line 49: warning: comment on exported const DriveStatusOnline should be of the form "DriveStatusOnline ..." (golint)
    • Line 54: warning: comment on exported const DriveUsageInUse should be of the form "DriveUsageInUse ..." (golint)
    • Line 62: warning: comment on exported const DriveTypeHDD should be of the form "DriveTypeHDD ..." (golint)
    • Line 67: warning: comment on exported const DriveAnnotationRemoval should be of the form "DriveAnnotationRemoval ..." (golint)
    • Line 71: warning: comment on exported const DriveAnnotationReplacement should be of the form "DriveAnnotationReplacement ..." (golint)
    • Line 74: warning: comment on exported const OperationalStatusOperative should be of the form "OperationalStatusOperative ..." (golint)
    • Line 82: warning: comment on exported const VolumeUsageInUse should be of the form "VolumeUsageInUse ..." (golint)
    • Line 88: warning: comment on exported const VolumeAnnotationRelease should be of the form "VolumeAnnotationRelease ..." (golint)
    • Line 94: warning: comment on exported const VolumePreviousStatus should be of the form "VolumePreviousStatus ..." (golint)
    • Line 97: warning: comment on exported const ModeRAW should be of the form "ModeRAW ..." (golint)
    • Line 102: warning: comment on exported const LVGFreeSpaceAnnotation should be of the form "LVGFreeSpaceAnnotation ..." (golint)
    • Line 105: warning: comment on exported const LocationTypeDrive should be of the form "LocationTypeDrive ..." (golint)
    • Line 110: warning: comment on exported const ReservationRequested should be of the form "ReservationRequested ..." (golint)
    • Line 116: warning: comment on exported const StorageClassAny should be of the form "StorageClassAny ..." (golint)
    • api/v1/acreservationcrd/groupversion_info.go
    • Line 30: warning: comment on exported var GroupVersionACR should be of the form "GroupVersionACR ..." (golint)
    • Line 33: warning: comment on exported var SchemeBuilderACR should be of the form "SchemeBuilderACR ..." (golint)
    • Line 36: warning: comment on exported var AddToSchemeACR should be of the form "AddToSchemeACR ..." (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!


misspell99%

Misspell Finds commonly misspelled English words

    • pkg/scheduler/extender/healthserver/health_server_test.go
    • Line 36: warning: "responce" is a misspelling of "response" (misspell)
    • Line 38: warning: "responce" is a misspelling of "response" (misspell)
    • Line 56: warning: "responce" is a misspelling of "response" (misspell)
    • Line 58: warning: "responce" is a misspelling of "response" (misspell)
    • Line 78: warning: "responce" is a misspelling of "response" (misspell)
    • Line 80: warning: "responce" is a misspelling of "response" (misspell)
    • Line 100: warning: "responce" is a misspelling of "response" (misspell)
    • Line 102: warning: "responce" is a misspelling of "response" (misspell)
    • Line 116: warning: "responce" is a misspelling of "response" (misspell)
    • Line 118: warning: "responce" is a misspelling of "response" (misspell)