Preparing report...

Report for github.com/sbueringer/kubectl-openstack-plugin

A    Great!    Found 10 issues across 12 files

Tweet

gofmt91%

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!


gocyclo50%

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.

    • kubectl-openstack-plugin/pkg/cmd/volume.go
    • Line 230: warning: cyclomatic complexity 26 of function (*VolumesOptions).getPrettyVolumeList() is high (> 15) (gocyclo)
    • Line 331: warning: cyclomatic complexity 24 of function createLine() is high (> 15) (gocyclo)
    • Line 149: warning: cyclomatic complexity 16 of function (*VolumesOptions).runWithConfig() is high (> 15) (gocyclo)

golint16%

Golint is a linter for Go source code.

    • kubectl-openstack-plugin/pkg/output/mattermost/mattermost.go
    • Line 43: warning: exported type MattermostMessage should have comment or be unexported (golint)
    • Line 51: warning: exported type MattermostMessageAttachement should have comment or be unexported (golint)
    • Line 57: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 76: warning: exported method Mattermost.SendMessage should have comment or be unexported (golint)
    • kubectl-openstack-plugin/pkg/cmd/config_import.go
    • Line 16: warning: exported type ImportConfigOptions should have comment or be unexported (golint)
    • Line 33: warning: exported function NewCmdImportConfig should have comment or be unexported (golint)
    • Line 62: warning: exported method ImportConfigOptions.Complete should have comment or be unexported (golint)
    • Line 67: warning: exported method ImportConfigOptions.Validate should have comment or be unexported (golint)
    • Line 77: warning: exported method ImportConfigOptions.Run should have comment or be unexported (golint)
    • kubectl-openstack-plugin/pkg/openstack/openstack.go
    • Line 21: warning: exported function GetVolumes should have comment or be unexported (golint)
    • Line 41: warning: exported function GetServer should have comment or be unexported (golint)
    • Line 61: warning: exported function GetLB should have comment or be unexported (golint)
    • Line 151: warning: exported function GetOpenStackClient should have comment or be unexported (golint)
    • Line 282: warning: exported function GetVolumeAttachmentsForServerNova should have comment or be unexported (golint)
    • Line 296: warning: exported function GetVolumeAttachmentsNova should have comment or be unexported (golint)
    • Line 314: warning: exported function AttachVolumeNova should have comment or be unexported (golint)
    • Line 346: warning: exported function DetachVolumeNova should have comment or be unexported (golint)
    • Line 372: warning: exported type NovaVolumeAttachments should have comment or be unexported (golint)
    • Line 387: warning: exported function DetachVolumeCinder should have comment or be unexported (golint)
    • Line 423: warning: exported function AttachVolumeCinder should have comment or be unexported (golint)
    • kubectl-openstack-plugin/pkg/kubernetes/kubernetes.go
    • Line 15: warning: exported function GetKubeClient should have comment or be unexported (golint)
    • Line 24: warning: exported function GetNodes should have comment or be unexported (golint)
    • Line 37: warning: exported function GetServices should have comment or be unexported (golint)
    • Line 53: warning: exported function GetPersistentVolumes should have comment or be unexported (golint)
    • Line 74: warning: exported function GetPodsByPVC should have comment or be unexported (golint)
    • Line 96: warning: exported function GetMatchingContexts should have comment or be unexported (golint)
    • Line 123: warning: exported function FindNotEvictedPods should have comment or be unexported (golint)
    • Line 133: warning: exported function GetPodStatus should have comment or be unexported (golint)
    • kubectl-openstack-plugin/pkg/cmd/volume-fix.go
    • Line 14: warning: comment on exported type VolumesFixOptions should be of the form "VolumesFixOptions ..." (with optional leading article) (golint)
    • Line 41: warning: comment on exported function NewCmdVolumesFix should be of the form "NewCmdVolumesFix ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell91%

Misspell Finds commonly misspelled English words