Preparing report...

Report for github.com/openebs/node-disk-manager

A+    Excellent!    Found 30 issues across 196 files

Tweet

gofmt97%

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!


gocyclo97%

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.


golint89%

Golint is a linter for Go source code.

    • node-disk-manager/cmd/manager/main.go
    • Line 170: warning: don't use underscores in Go names; var v040_v041UpgradeTask should be v040V041UpgradeTask (golint)
    • Line 171: warning: don't use underscores in Go names; var v041_v042UpgradeTask should be v041V042UpgradeTask (golint)
    • node-disk-manager/pkg/udev/common.go
    • Line 36: warning: exported const NDMBlockDevicePrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 165: warning: comment on exported method UdevDevice.IsParitition should be of the form "IsParitition ..." (golint)
    • node-disk-manager/blockdevice/blockdevice.go
    • Line 205: warning: comment on exported const BlockDeviceTypeDisk should be of the form "BlockDeviceTypeDisk ..." (golint)
    • Line 379: warning: exported type DeviceMapperInformation should have comment or be unexported (golint)
    • Line 420: warning: comment on exported const CStor should be of the form "CStor ..." (golint)
    • Line 423: warning: comment on exported const ZFSLocalPV should be of the form "ZFSLocalPV ..." (golint)
    • Line 426: warning: comment on exported const Mayastor should be of the form "Mayastor ..." (golint)
    • Line 429: warning: comment on exported const LocalPV should be of the form "LocalPV ..." (golint)
    • Line 432: warning: comment on exported const Jiva should be of the form "Jiva ..." (golint)
    • node-disk-manager/cmd/ndm_daemonset/probe/addhandler.go
    • Line 180: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 283: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 292: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 394: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 433: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 450: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 491: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • node-disk-manager/pkg/seachest/seachest.go
    • Line 43: warning: comment on exported function SeachestErrors should be of the form "SeachestErrors ..." (golint)
    • Line 76: warning: exported method Identifier.SeachestBasicDiskInfo should have comment or be unexported (golint)
    • Line 108: warning: exported method Identifier.GetHostName should have comment or be unexported (golint)
    • Line 112: warning: exported method Identifier.GetModelNumber should have comment or be unexported (golint)
    • Line 119: warning: exported method Identifier.GetUuid should have comment or be unexported (golint)
    • Line 124: warning: exported method Identifier.GetCapacity should have comment or be unexported (golint)
    • Line 130: warning: exported method Identifier.GetSerialNumber should have comment or be unexported (golint)
    • Line 137: warning: exported method Identifier.GetVendorID should have comment or be unexported (golint)
    • Line 144: warning: exported method Identifier.GetPath should have comment or be unexported (golint)
    • Line 148: warning: exported method Identifier.GetFirmwareRevision should have comment or be unexported (golint)
    • Line 155: warning: exported method Identifier.GetLogicalSectorSize should have comment or be unexported (golint)
    • Line 159: warning: exported method Identifier.GetPhysicalSectorSize should have comment or be unexported (golint)
    • Line 163: warning: exported method Identifier.GetRotationRate should have comment or be unexported (golint)
    • Line 170: warning: exported method Identifier.GetRotationalLatency should have comment or be unexported (golint)
    • Line 182: warning: exported method Identifier.DriveType should have comment or be unexported (golint)
    • Line 194: warning: exported method Identifier.GetTotalBytesRead should have comment or be unexported (golint)
    • Line 198: warning: exported method Identifier.GetTotalBytesWritten should have comment or be unexported (golint)
    • Line 202: warning: exported method Identifier.GetDeviceUtilizationRate should have comment or be unexported (golint)
    • Line 206: warning: exported method Identifier.GetPercentEnduranceUsed should have comment or be unexported (golint)
    • Line 213: warning: exported method Identifier.GetTemperatureDataValidStatus should have comment or be unexported (golint)
    • Line 217: warning: exported method Identifier.GetCurrentTemperature should have comment or be unexported (golint)
    • Line 221: warning: exported method Identifier.GetHighestValid should have comment or be unexported (golint)
    • Line 225: warning: exported method Identifier.GetHighestTemperature should have comment or be unexported (golint)
    • Line 229: warning: exported method Identifier.GetLowestValid should have comment or be unexported (golint)
    • Line 233: warning: exported method Identifier.GetLowestTemperature should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words