Preparing report...

Report for github.com/netapp/trident

(v19.10.1+incompatible)

A+    Excellent!    Found 42 issues across 437 files

Tweet

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!


gofmt96%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

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.

    • storage_drivers/solidfire/solidfire_san.go
    • Line 556: warning: cyclomatic complexity 25 of function (*SANStorageDriver).validate() is high (> 15) (gocyclo)
    • Line 705: warning: cyclomatic complexity 24 of function (*SANStorageDriver).Create() is high (> 15) (gocyclo)
    • Line 849: warning: cyclomatic complexity 21 of function (*SANStorageDriver).CreateClone() is high (> 15) (gocyclo)
    • main.go
    • Line 221: warning: cyclomatic complexity 40 of function main() is high (> 15) (gocyclo)
    • Line 118: warning: cyclomatic complexity 33 of function processCmdLineArgs() is high (> 15) (gocyclo)
    • utils/version.go
    • Line 48: warning: cyclomatic complexity 28 of function parse() is high (> 15) (gocyclo)
    • Line 234: warning: cyclomatic complexity 23 of function (*Version).compareInternal() is high (> 15) (gocyclo)
    • storage_drivers/aws/aws_cvs.go
    • Line 396: warning: cyclomatic complexity 23 of function (*NFSStorageDriver).validate() is high (> 15) (gocyclo)
    • Line 503: warning: cyclomatic complexity 22 of function (*NFSStorageDriver).Create() is high (> 15) (gocyclo)
    • storage_drivers/gcp/gcp_cvs.go
    • Line 495: warning: cyclomatic complexity 24 of function (*NFSStorageDriver).Create() is high (> 15) (gocyclo)
    • Line 404: warning: cyclomatic complexity 21 of function (*NFSStorageDriver).validate() is high (> 15) (gocyclo)
    • Line 679: warning: cyclomatic complexity 17 of function (*NFSStorageDriver).CreateClone() is high (> 15) (gocyclo)
    • storage_drivers/fake/storage_class_test.go
    • Line 310: warning: cyclomatic complexity 17 of function TestSpecificBackends() is high (> 15) (gocyclo)
    • Line 650: warning: cyclomatic complexity 17 of function TestRegex2() is high (> 15) (gocyclo)
    • Line 428: warning: cyclomatic complexity 17 of function TestRegex() is high (> 15) (gocyclo)
    • core/orchestrator_core_test.go
    • Line 1230: warning: cyclomatic complexity 52 of function TestBackendUpdateAndDelete() is high (> 15) (gocyclo)
    • Line 424: warning: cyclomatic complexity 47 of function TestAddStorageClassVolumes() is high (> 15) (gocyclo)
    • Line 2267: warning: cyclomatic complexity 40 of function TestOrchestratorNotReady() is high (> 15) (gocyclo)
    • Line 2827: warning: cyclomatic complexity 24 of function TestSnapshotVolumes() is high (> 15) (gocyclo)
    • Line 901: warning: cyclomatic complexity 22 of function TestCloneVolumes() is high (> 15) (gocyclo)
    • Line 146: warning: cyclomatic complexity 18 of function diffExternalBackends() is high (> 15) (gocyclo)
    • Line 344: warning: cyclomatic complexity 17 of function validateStorageClass() is high (> 15) (gocyclo)
    • persistent_store/etcdv3_test.go
    • Line 730: warning: cyclomatic complexity 24 of function TestEtcdv3ReplaceBackendAndUpdateVolumes() is high (> 15) (gocyclo)
    • Line 848: warning: cyclomatic complexity 24 of function TestEtcdv3FailedReplaceBackendAndUpdateVolumes() is high (> 15) (gocyclo)
    • storage_drivers/ontap/ontap_nas_qtree.go
    • Line 1259: warning: cyclomatic complexity 18 of function (*NASQtreeStorageDriver).GetVolumeExternalWrappers() is high (> 15) (gocyclo)
    • Line 206: warning: cyclomatic complexity 16 of function (*NASQtreeStorageDriver).Create() is high (> 15) (gocyclo)
    • cli/cmd/install.go
    • Line 498: warning: cyclomatic complexity 74 of function installTrident() is high (> 15) (gocyclo)
    • Line 1554: warning: cyclomatic complexity 34 of function installTridentInCluster() is high (> 15) (gocyclo)
    • Line 873: warning: cyclomatic complexity 20 of function discoverLegacyEtcdData() is high (> 15) (gocyclo)
    • core/orchestrator_core.go
    • Line 384: warning: cyclomatic complexity 38 of function (*TridentOrchestrator).handleFailedTransaction() is high (> 15) (gocyclo)
    • Line 798: warning: cyclomatic complexity 24 of function (*TridentOrchestrator).updateBackendByBackendUUID() is high (> 15) (gocyclo)
    • Line 2450: warning: cyclomatic complexity 18 of function (*TridentOrchestrator).DeleteSnapshot() is high (> 15) (gocyclo)
    • cli/cmd/uninstall.go
    • Line 134: warning: cyclomatic complexity 26 of function uninstallTrident() is high (> 15) (gocyclo)
    • Line 379: warning: cyclomatic complexity 22 of function uninstallTridentInCluster() is high (> 15) (gocyclo)
    • utils/osutils.go
    • Line 69: warning: cyclomatic complexity 22 of function AttachISCSIVolume() is high (> 15) (gocyclo)
    • Line 1451: warning: cyclomatic complexity 18 of function GetISCSIDevices() is high (> 15) (gocyclo)
    • Line 1191: warning: cyclomatic complexity 17 of function ISCSIRescanDevices() is high (> 15) (gocyclo)
    • storage/backend.go
    • Line 844: warning: cyclomatic complexity 20 of function (*BackendPersistent).InjectBackendSecrets() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!