Preparing report...

Report for github.com/vmware/vsphere-storage-for-docker

A+    Excellent!    Found 31 issues across 102 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


gocyclo98%

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.


golint86%

Golint is a linter for Go source code.

    • vsphere-storage-for-docker/tests/utils/admincli/vmgroupmgmt.go
    • Line 53: warning: don't use underscores in Go names; func parameter delete_vol should be deleteVol (golint)
    • Line 258: warning: comment on exported function RemoveDatastoreFromVmgroup should be of the form "RemoveDatastoreFromVmgroup ..." (golint)
    • Line 271: warning: comment on exported function SetDefaultDatastoreForVMgroup should be of the form "SetDefaultDatastoreForVMgroup ..." (golint)
    • vsphere-storage-for-docker/client_plugin/drivers/vfile/dockerops/dockerops.go
    • Line 56: warning: comment on exported const FileShareName should be of the form "FileShareName ..." (golint)
    • Line 58: warning: comment on exported const FileSharePath should be of the form "FileSharePath ..." (golint)
    • Line 60: warning: comment on exported const SambaUsername should be of the form "SambaUsername ..." (golint)
    • Line 62: warning: comment on exported const SambaPassword should be of the form "SambaPassword ..." (golint)
    • Line 77: warning: comment on exported function GetServiceStartTimeout should be of the form "GetServiceStartTimeout ..." (golint)
    • Line 92: warning: exported function NewDockerOps should have comment or be unexported (golint)
    • Line 185: warning: comment on exported method DockerOps.VolumeRemove should be of the form "VolumeRemove ..." (golint)
    • Line 432: warning: comment on exported method DockerOps.DeleteInternalVolume should be of the form "DeleteInternalVolume ..." (golint)
    • Line 491: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 531: warning: comment on exported method DockerOps.LoadFileServerImage should be of the form "LoadFileServerImage ..." (golint)
    • vsphere-storage-for-docker/client_plugin/utils/refcount/refcnt.go
    • Line 91: warning: exported const ApiVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 160: warning: comment on exported method RefCountsMap.IsInitialized should be of the form "IsInitialized ..." (golint)
    • Line 165: warning: comment on exported method RefCountsMap.MarkDirty should be of the form "MarkDirty ..." (golint)
    • Line 172: warning: comment on exported method RefCountsMap.Init should be of the form "Init ..." (golint)
    • Line 255: warning: comment on exported method RefCountsMap.GetCount should be of the form "GetCount ..." (golint)
    • Line 319: warning: don't use underscores in Go names; func parameter mount_source should be mountSource (golint)
    • Line 378: warning: don't use underscores in Go names; var ctx_inspect should be ctxInspect (golint)
    • Line 378: warning: don't use underscores in Go names; var cancel_inspect should be cancelInspect (golint)
    • vsphere-storage-for-docker/client_plugin/drivers/vfile/kvstore/etcdops/etcdops.go
    • Line 83: warning: exported type EtcdKVS should have comment or be unexported (golint)
    • Line 100: warning: exported type EtcdLock should have comment or be unexported (golint)
    • Line 891: warning: comment on exported method EtcdKVS.CreateLock should be of the form "CreateLock ..." (golint)
    • Line 910: warning: comment on exported method EtcdLock.TryLock should be of the form "TryLock ..." (golint)
    • Line 923: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 931: warning: comment on exported method EtcdLock.BlockingLockWithLease should be of the form "BlockingLockWithLease ..." (golint)
    • Line 969: warning: comment on exported method EtcdLock.ClearLock should be of the form "ClearLock ..." (golint)
    • Line 982: warning: comment on exported method EtcdLock.ReleaseLock should be of the form "ReleaseLock ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign89%

IneffAssign detects ineffectual assignments in Go code.

    • vsphere-storage-for-docker/tests/e2e/vmgroups_test.go
    • Line 89: warning: ineffectual assignment to out (ineffassign)
    • Line 89: warning: ineffectual assignment to err (ineffassign)
    • Line 115: warning: ineffectual assignment to out (ineffassign)
    • Line 115: warning: ineffectual assignment to err (ineffassign)
    • Line 328: warning: ineffectual assignment to err (ineffassign)
    • Line 422: warning: ineffectual assignment to out (ineffassign)
    • Line 422: warning: ineffectual assignment to err (ineffassign)
    • Line 490: warning: ineffectual assignment to out (ineffassign)
    • Line 490: warning: ineffectual assignment to err (ineffassign)
    • Line 513: warning: ineffectual assignment to err (ineffassign)

misspell92%

Misspell Finds commonly misspelled English words