Preparing report...

Report for github.com/yunify/qingstor-csi

A    Great!    Found 20 issues across 32 files

Tweet

gofmt81%

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.


golint43%

Golint is a linter for Go source code.

    • qingstor-csi/pkg/service/option.go
    • Line 27: warning: exported var DefaultBackOff should have comment or be unexported (golint)
    • Line 35: warning: exported type Option should have comment or be unexported (golint)
    • Line 49: warning: comment on exported function NewOption should be of the form "NewOption ..." (golint)
    • Line 56: warning: exported method Option.SetName should have comment or be unexported (golint)
    • Line 61: warning: exported method Option.SetVersion should have comment or be unexported (golint)
    • Line 66: warning: exported method Option.SetNodeId should have comment or be unexported (golint)
    • Line 71: warning: exported method Option.SetMaxVolume should have comment or be unexported (golint)
    • Line 76: warning: exported method Option.SetVolumeCapabilityAccessNodes should have comment or be unexported (golint)
    • Line 85: warning: exported method Option.SetControllerServiceCapabilities should have comment or be unexported (golint)
    • Line 95: warning: exported method Option.SetNodeServiceCapabilities should have comment or be unexported (golint)
    • Line 105: warning: exported method Option.SetPluginCapabilities should have comment or be unexported (golint)
    • Line 110: warning: exported method Option.SetRetryTime should have comment or be unexported (golint)
    • Line 115: warning: exported method Option.ValidateVolumeCapability should have comment or be unexported (golint)
    • Line 122: warning: exported method Option.ValidateVolumeCapabilities should have comment or be unexported (golint)
    • Line 142: warning: exported method Option.ValidateVolumeAccessMode should have comment or be unexported (golint)
    • qingstor-csi/pkg/storage/provider.go
    • Line 23: warning: exported type ControllerOperator should have comment or be unexported (golint)
    • Line 39: warning: exported type NodeOperator should have comment or be unexported (golint)
    • Line 45: warning: exported type Provider should have comment or be unexported (golint)
    • qingstor-csi/pkg/storage/neonsan/utils.go
    • Line 1: warning: package comment should be of the form "Package neonsan ..." (golint)
    • Line 31: warning: exported function SplitSnapshotName should have comment or be unexported (golint)
    • Line 40: warning: exported function JoinSnapshotName should have comment or be unexported (golint)
    • Line 44: warning: exported function SplitVolumeName should have comment or be unexported (golint)
    • Line 52: warning: exported function JoinVolumeName should have comment or be unexported (golint)
    • Line 56: warning: exported function GetPoolName should have comment or be unexported (golint)
    • Line 65: warning: exported function TuneUpParameter should have comment or be unexported (golint)
    • qingstor-csi/pkg/common/common.go
    • Line 30: warning: exported const Hash should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 50: warning: comment on exported function GenerateHashInEightBytes should be of the form "GenerateHashInEightBytes ..." (golint)
    • Line 60: warning: comment on exported function IsValidCapacityBytes should be of the form "IsValidCapacityBytes ..." (golint)
    • Line 74: warning: comment on exported function ExecCommand should be of the form "ExecCommand ..." (golint)
    • Line 96: warning: exported function DefaultRetryErrorFunc should have comment or be unexported (golint)
    • qingstor-csi/pkg/service/utils.go
    • Line 30: warning: exported function GetInstanceIdFromFile should have comment or be unexported (golint)
    • Line 41: warning: exported function NewControllerServiceCapability should have comment or be unexported (golint)
    • Line 51: warning: exported function NewNodeServiceCapability should have comment or be unexported (golint)
    • Line 61: warning: comment on exported function GetRequiredVolumeSizeByte should be of the form "GetRequiredVolumeSizeByte ..." (golint)
    • qingstor-csi/pkg/storage/neonsan/api/api.go
    • Line 36: warning: exported const RetCodeOK should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported type Volume should have comment or be unexported (golint)
    • Line 59: warning: exported type VolumeForClone should have comment or be unexported (golint)
    • Line 71: warning: exported function ListVolume should have comment or be unexported (golint)
    • Line 91: warning: exported function CreateVolume should have comment or be unexported (golint)
    • Line 102: warning: exported function DeleteVolume should have comment or be unexported (golint)
    • Line 112: warning: exported function ResizeVolume should have comment or be unexported (golint)
    • Line 123: warning: exported function GetVolumeForClone should have comment or be unexported (golint)
    • Line 137: warning: exported function CloneVolume should have comment or be unexported (golint)
    • Line 150: warning: exported function ListClone should have comment or be unexported (golint)
    • Line 166: warning: exported function ListClone220 should have comment or be unexported (golint)
    • Line 183: warning: exported function DetachCloneRelationship should have comment or be unexported (golint)
    • Line 193: warning: exported function CreateSnapshot should have comment or be unexported (golint)
    • Line 204: warning: exported function DeleteSnapshot should have comment or be unexported (golint)
    • Line 215: warning: exported function ListSnapshot should have comment or be unexported (golint)
    • Line 304: warning: don't use underscores in Go names; var zkIp_ should be zkIP (golint)
    • Line 315: warning: don't use underscores in Go names; var clusterName_ should be clusterName (golint)
    • qingstor-csi/pkg/storage/neonsan/api/request.go
    • Line 23: warning: exported type ResponseHeader should have comment or be unexported (golint)
    • Line 29: warning: exported method ResponseHeader.Header should have comment or be unexported (golint)
    • Line 33: warning: exported type Response should have comment or be unexported (golint)
    • Line 37: warning: exported type CreateVolumeRequest should have comment or be unexported (golint)
    • Line 63: warning: exported type CreateVolumeResponse should have comment or be unexported (golint)
    • Line 69: warning: exported type DeleteVolumeRequest should have comment or be unexported (golint)
    • Line 75: warning: exported type DeleteVolumeResponse should have comment or be unexported (golint)
    • Line 80: warning: exported type ResizeVolumeRequest should have comment or be unexported (golint)
    • Line 87: warning: exported type ResizeVolumeResponse should have comment or be unexported (golint)
    • Line 93: warning: exported type ListVolumeRequest should have comment or be unexported (golint)
    • Line 99: warning: exported type ListVolumeResponse should have comment or be unexported (golint)
    • Line 105: warning: exported type GetVolumeForCloneRequest should have comment or be unexported (golint)
    • Line 111: warning: exported type GetVolumeForCloneResponse should have comment or be unexported (golint)
    • Line 116: warning: exported type CloneVolumeRequest should have comment or be unexported (golint)
    • Line 126: warning: exported type CloneVolumeResponse should have comment or be unexported (golint)
    • Line 132: warning: exported type ListCloneRequest should have comment or be unexported (golint)
    • Line 137: warning: exported type ListCloneRequest220 should have comment or be unexported (golint)
    • Line 143: warning: exported type CloneInfo should have comment or be unexported (golint)
    • Line 152: warning: exported type ListCloneResponse should have comment or be unexported (golint)
    • Line 157: warning: exported type DetachCloneRelationshipRequest should have comment or be unexported (golint)
    • Line 163: warning: exported type CloneRelation should have comment or be unexported (golint)
    • Line 168: warning: exported type DetachCloneRelationshipResponse should have comment or be unexported (golint)
    • Line 173: warning: exported type CreateSnapshotRequest should have comment or be unexported (golint)
    • Line 180: warning: exported type CreateSnapshotResponse should have comment or be unexported (golint)
    • Line 184: warning: exported type DeleteSnapshotRequest should have comment or be unexported (golint)
    • Line 191: warning: exported type DeleteSnapshotResponse should have comment or be unexported (golint)
    • Line 196: warning: exported type ListSnapshotRequest should have comment or be unexported (golint)
    • Line 203: warning: exported type SnapshotInfo should have comment or be unexported (golint)
    • Line 211: warning: exported type ListSnapshotResponse should have comment or be unexported (golint)
    • qingstor-csi/pkg/test/e2e/suites.go
    • Line 1: warning: package comment should be of the form "Package e2e ..." (golint)
    • Line 19: warning: should not use dot imports (golint)
    • Line 20: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 28: warning: exported var CSITestSuites should have comment or be unexported (golint)
    • qingstor-csi/pkg/service/constants.go
    • Line 21: warning: exported var DefaultVolumeAccessModeType should have comment or be unexported (golint)
    • Line 26: warning: exported var DefaultControllerServiceCapability should have comment or be unexported (golint)
    • Line 33: warning: exported var DefaultNodeServiceCapability should have comment or be unexported (golint)
    • Line 39: warning: exported var DefaultPluginCapability should have comment or be unexported (golint)
    • qingstor-csi/pkg/service/rpc.go
    • Line 31: warning: comment on exported type NonBlockingGRPCServer should be of the form "NonBlockingGRPCServer ..." (with optional leading article) (golint)
    • Line 43: warning: exported function NewNonBlockingGRPCServer should have comment or be unexported (golint)
    • Line 122: warning: comment on exported function Run should be of the form "Run ..." (golint)
    • qingstor-csi/pkg/common/lock.go
    • Line 26: warning: exported const OperationPendingFmt should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported function NewResourceLocks should have comment or be unexported (golint)
    • Line 55: warning: exported method ResourceLocks.Release should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!