Gofmt formats Go programs. We run gofmt -s
on your code, where -s
is for the "simplify" command
No problems detected. Good job!
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!
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.
No problems detected. Good job!
Golint is a linter for Go source code.
-
solidfire-exporter/pkg/testutils/solidfire_mock.go
- Line 10: warning: exported type MockSolidfireClient should have comment or be unexported (golint)
- Line 14: warning: exported method MockSolidfireClient.GetClusterCapacity should have comment or be unexported (golint)
- Line 18: warning: exported method MockSolidfireClient.GetClusterFullThreshold should have comment or be unexported (golint)
- Line 22: warning: exported method MockSolidfireClient.GetClusterStats should have comment or be unexported (golint)
- Line 26: warning: exported method MockSolidfireClient.ListAllNodes should have comment or be unexported (golint)
- Line 30: warning: exported method MockSolidfireClient.ListClusterFaults should have comment or be unexported (golint)
- Line 34: warning: exported method MockSolidfireClient.ListDrives should have comment or be unexported (golint)
- Line 38: warning: exported method MockSolidfireClient.ListISCSISessions should have comment or be unexported (golint)
- Line 42: warning: exported method MockSolidfireClient.ListNodeStats should have comment or be unexported (golint)
- Line 46: warning: exported method MockSolidfireClient.ListVolumeQoSHistograms should have comment or be unexported (golint)
- Line 50: warning: exported method MockSolidfireClient.ListVolumes should have comment or be unexported (golint)
- Line 54: warning: exported method MockSolidfireClient.ListVolumeStats should have comment or be unexported (golint)
-
solidfire-exporter/pkg/prom/collector.go
- Line 19: warning: exported type SolidfireCollector should have comment or be unexported (golint)
- Line 25: warning: exported type CollectorOpts should have comment or be unexported (golint)
- Line 32: warning: exported var MetricDescriptions should have comment or be unexported (golint)
- Line 51: warning: exported method SolidfireCollector.Describe should have comment or be unexported (golint)
- Line 1254: warning: exported method SolidfireCollector.Collect should have comment or be unexported (golint)
- Line 1307: warning: exported function NewCollector should have comment or be unexported (golint)
- Line 1326: warning: exported function GigabytesToBytes should have comment or be unexported (golint)
- Line 1330: warning: exported function MicrosecondsToSeconds should have comment or be unexported (golint)
- Line 1334: warning: exported function MillisecondsToSeconds should have comment or be unexported (golint)
-
solidfire-exporter/pkg/testutils/collector.go
- Line 7: warning: exported var CollectOutputHappyPath should have comment or be unexported (golint)
- Line 287: warning: exported var CollectOutputVolumeListErr should have comment or be unexported (golint)
- Line 293: warning: exported var CollectOutputVolumeStatsErr should have comment or be unexported (golint)
-
solidfire-exporter/pkg/solidfire/solidfire.go
- Line 18: warning: exported type RPC should have comment or be unexported (golint)
- Line 21: warning: exported const RPCGetClusterCapacity should have comment (or a comment on this block) or be unexported (golint)
- Line 34: warning: exported function NewSolidfireClient should have comment or be unexported (golint)
- Line 87: warning: exported method Client.ListVolumes should have comment or be unexported (golint)
- Line 87: warning: receiver name s should be consistent with previous receiver name c for Client (golint)
- Line 108: warning: exported method Client.ListVolumeStats should have comment or be unexported (golint)
- Line 108: warning: receiver name s should be consistent with previous receiver name c for Client (golint)
- Line 131: warning: exported method Client.GetClusterCapacity should have comment or be unexported (golint)
- Line 131: warning: receiver name s should be consistent with previous receiver name c for Client (golint)
- Line 150: warning: exported method Client.ListClusterFaults should have comment or be unexported (golint)
- Line 150: warning: receiver name s should be consistent with previous receiver name c for Client (golint)
- Line 174: warning: exported method Client.ListNodeStats should have comment or be unexported (golint)
- Line 174: warning: receiver name s should be consistent with previous receiver name c for Client (golint)
- Line 194: warning: exported method Client.ListVolumeQoSHistograms should have comment or be unexported (golint)
- Line 194: warning: receiver name s should be consistent with previous receiver name c for Client (golint)
- Line 218: warning: exported method Client.ListAllNodes should have comment or be unexported (golint)
- Line 218: warning: receiver name s should be consistent with previous receiver name c for Client (golint)
- Line 240: warning: exported method Client.GetClusterStats should have comment or be unexported (golint)
- Line 240: warning: receiver name s should be consistent with previous receiver name c for Client (golint)
- Line 262: warning: exported method Client.GetClusterFullThreshold should have comment or be unexported (golint)
- Line 262: warning: receiver name s should be consistent with previous receiver name c for Client (golint)
- Line 284: warning: exported method Client.ListDrives should have comment or be unexported (golint)
- Line 284: warning: receiver name s should be consistent with previous receiver name c for Client (golint)
- Line 306: warning: exported method Client.ListISCSISessions should have comment or be unexported (golint)
- Line 306: warning: receiver name s should be consistent with previous receiver name c for Client (golint)
-
solidfire-exporter/pkg/solidfire/types.go
- Line 10: warning: exported const ListenAddress should have comment (or a comment on this block) or be unexported (golint)
- Line 34: warning: exported type Client should have comment or be unexported (golint)
- Line 40: warning: exported type Interface should have comment or be unexported (golint)
- Line 53: warning: exported type RPCBody should have comment or be unexported (golint)
- Line 58: warning: exported type RPCParams should have comment or be unexported (golint)
- Line 59: warning: exported type ListVolumesRPCParams should have comment or be unexported (golint)
- Line 62: warning: exported type ListVolumeStatsRPCParams should have comment or be unexported (golint)
- Line 66: warning: exported type GetClusterCapacityRPCParams should have comment or be unexported (golint)
- Line 70: warning: exported type ListClusterFaultsRPCParams should have comment or be unexported (golint)
- Line 75: warning: exported type ListNodeStatsRPCParams should have comment or be unexported (golint)
- Line 79: warning: exported type ListVolumeQoSHistogramsRPCParams should have comment or be unexported (golint)
- Line 83: warning: exported type ListAllNodesRPCParams should have comment or be unexported (golint)
- Line 86: warning: exported type GetClusterStatsRPCParams should have comment or be unexported (golint)
- Line 90: warning: exported type GetClusterFullThresholdParams should have comment or be unexported (golint)
- Line 94: warning: exported type ListDrivesParams should have comment or be unexported (golint)
- Line 98: warning: exported type ListISCSISessionsParams should have comment or be unexported (golint)
- Line 102: warning: exported type ListVolumesResponse should have comment or be unexported (golint)
- Line 155: warning: exported type ListVolumeStatsResponse should have comment or be unexported (golint)
- Line 199: warning: exported type GetClusterCapacityResponse should have comment or be unexported (golint)
- Line 229: warning: exported type ListClusterFaultsResponse should have comment or be unexported (golint)
- Line 254: warning: exported type ListNodeStatsResponse should have comment or be unexported (golint)
- Line 290: warning: exported type ListVolumeQoSHistogramsResponse should have comment or be unexported (golint)
- Line 349: warning: exported type ListAllNodesResponse should have comment or be unexported (golint)
- Line 383: warning: exported type GetClusterStatsResponse should have comment or be unexported (golint)
- Line 415: warning: exported type GetClusterFullThresholdResponse should have comment or be unexported (golint)
- Line 438: warning: exported type ListDrivesResponse should have comment or be unexported (golint)
- Line 455: warning: exported type ListISCSISessionsResponse should have comment or be unexported (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
-
solidfire-exporter/pkg/solidfire/solidfire.go
- Line 95: warning: ineffectual assignment to err (ineffassign)
- Line 117: warning: ineffectual assignment to err (ineffassign)
- Line 137: warning: ineffectual assignment to err (ineffassign)
- Line 160: warning: ineffectual assignment to err (ineffassign)
- Line 181: warning: ineffectual assignment to err (ineffassign)
- Line 203: warning: ineffectual assignment to err (ineffassign)
- Line 225: warning: ineffectual assignment to err (ineffassign)
- Line 247: warning: ineffectual assignment to err (ineffassign)
- Line 269: warning: ineffectual assignment to err (ineffassign)
- Line 291: warning: ineffectual assignment to err (ineffassign)
- Line 313: warning: ineffectual assignment to err (ineffassign)
Misspell Finds commonly misspelled English words
No problems detected. Good job!