Preparing report...

Report for github.com/dell/csi-unity

A+    Excellent!    Found 11 issues across 25 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!


gocyclo76%

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.

    • csi-unity/service/controller.go
    • Line 1360: warning: cyclomatic complexity 40 of function (*service).exportFilesystem() is high (> 15) (gocyclo)
    • Line 1565: warning: cyclomatic complexity 38 of function (*service).unexportFilesystem() is high (> 15) (gocyclo)
    • Line 1011: warning: cyclomatic complexity 27 of function (*service).createVolumeClone() is high (> 15) (gocyclo)
    • Line 1147: warning: cyclomatic complexity 26 of function (*service).createVolumeFromSnap() is high (> 15) (gocyclo)
    • Line 83: warning: cyclomatic complexity 23 of function (*service).CreateVolume() is high (> 15) (gocyclo)
    • Line 899: warning: cyclomatic complexity 20 of function (*service).createIdempotentSnapshot() is high (> 15) (gocyclo)
    • Line 688: warning: cyclomatic complexity 19 of function (*service).ControllerExpandVolume() is high (> 15) (gocyclo)
    • csi-unity/service/node.go
    • Line 1380: warning: cyclomatic complexity 38 of function (*service).addNodeInformationIntoArray() is high (> 15) (gocyclo)
    • Line 46: warning: cyclomatic complexity 31 of function (*service).NodeStageVolume() is high (> 15) (gocyclo)
    • Line 211: warning: cyclomatic complexity 27 of function (*service).NodeUnstageVolume() is high (> 15) (gocyclo)
    • Line 849: warning: cyclomatic complexity 23 of function (*service).NodeExpandVolume() is high (> 15) (gocyclo)
    • Line 339: warning: cyclomatic complexity 19 of function (*service).NodePublishVolume() is high (> 15) (gocyclo)
    • Line 1686: warning: cyclomatic complexity 19 of function (*service).validateProtocols() is high (> 15) (gocyclo)
    • Line 983: warning: cyclomatic complexity 16 of function (*service).getNFSShare() is high (> 15) (gocyclo)
    • Line 633: warning: cyclomatic complexity 16 of function (*service).NodeUnpublishVolume() is high (> 15) (gocyclo)
    • csi-unity/service/mount.go
    • Line 115: warning: cyclomatic complexity 29 of function publishNFS() is high (> 15) (gocyclo)
    • Line 501: warning: cyclomatic complexity 25 of function unstageVolume() is high (> 15) (gocyclo)
    • Line 28: warning: cyclomatic complexity 21 of function stagePublishNFS() is high (> 15) (gocyclo)
    • Line 228: warning: cyclomatic complexity 21 of function stageVolume() is high (> 15) (gocyclo)
    • Line 334: warning: cyclomatic complexity 21 of function publishVolume() is high (> 15) (gocyclo)

golint96%

Golint is a linter for Go source code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign68%

IneffAssign detects ineffectual assignments in Go code.

    • csi-unity/service/controller.go
    • Line 252: warning: ineffectual assignment to resp (ineffassign)
    • Line 257: warning: ineffectual assignment to err (ineffassign)
    • Line 617: warning: ineffectual assignment to ctx (ineffassign)
    • Line 886: warning: ineffectual assignment to snapResp (ineffassign)
    • Line 1071: warning: ineffectual assignment to err (ineffassign)
    • Line 1195: warning: ineffectual assignment to err (ineffassign)
    • Line 1321: warning: ineffectual assignment to err (ineffassign)

misspell92%

Misspell Finds commonly misspelled English words