Preparing report...

Report for github.com/kubernetes-sigs/aws-efs-csi-driver

A+    Excellent!    Found 18 issues across 31 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!


gocyclo90%

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.


golint51%

Golint is a linter for Go source code.

    • aws-efs-csi-driver/pkg/driver/identity.go
    • Line 27: warning: exported method Driver.GetPluginInfo should have comment or be unexported (golint)
    • Line 36: warning: exported method Driver.GetPluginCapabilities should have comment or be unexported (golint)
    • Line 53: warning: exported method Driver.Probe should have comment or be unexported (golint)
    • aws-efs-csi-driver/pkg/driver/vol_statter.go
    • Line 1: warning: package comment should be of the form "Package driver ..." (golint)
    • Line 38: warning: exported type VolStatter should have comment or be unexported (golint)
    • Line 44: warning: exported type VolStatterImpl should have comment or be unexported (golint)
    • Line 47: warning: exported function NewVolStatter should have comment or be unexported (golint)
    • Line 58: 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 82: 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)
    • aws-efs-csi-driver/pkg/cloud/metadata.go
    • Line 26: warning: exported type EC2Metadata should have comment or be unexported (golint)
    • Line 66: 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)
    • aws-efs-csi-driver/pkg/driver/gid_allocator.go
    • Line 12: warning: exported type IntHeap should have comment or be unexported (golint)
    • Line 24: warning: exported method IntHeap.Push should have comment or be unexported (golint)
    • Line 28: warning: exported method IntHeap.Pop should have comment or be unexported (golint)
    • Line 36: warning: exported type GidAllocator should have comment or be unexported (golint)
    • Line 41: warning: exported function NewGidAllocator should have comment or be unexported (golint)
    • Line 63: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • aws-efs-csi-driver/pkg/driver/node.go
    • Line 42: warning: exported method Driver.NodeStageVolume should have comment or be unexported (golint)
    • Line 46: warning: exported method Driver.NodeUnstageVolume should have comment or be unexported (golint)
    • Line 50: warning: exported method Driver.NodePublishVolume should have comment or be unexported (golint)
    • Line 193: warning: exported method Driver.NodeUnpublishVolume should have comment or be unexported (golint)
    • Line 243: warning: exported method Driver.NodeGetVolumeStats should have comment or be unexported (golint)
    • Line 276: warning: exported method Driver.NodeExpandVolume should have comment or be unexported (golint)
    • Line 280: warning: exported method Driver.NodeGetCapabilities should have comment or be unexported (golint)
    • Line 296: warning: exported method Driver.NodeGetInfo should have comment or be unexported (golint)
    • aws-efs-csi-driver/pkg/driver/controller.go
    • Line 33: warning: exported const AccessPointMode should have comment (or a comment on this block) or be unexported (golint)
    • Line 54: warning: exported method Driver.CreateVolume should have comment or be unexported (golint)
    • Line 208: warning: exported method Driver.DeleteVolume should have comment or be unexported (golint)
    • Line 283: warning: exported method Driver.ControllerPublishVolume should have comment or be unexported (golint)
    • Line 287: warning: exported method Driver.ControllerUnpublishVolume should have comment or be unexported (golint)
    • Line 291: warning: exported method Driver.ValidateVolumeCapabilities should have comment or be unexported (golint)
    • Line 317: warning: exported method Driver.ListVolumes should have comment or be unexported (golint)
    • Line 321: warning: exported method Driver.GetCapacity should have comment or be unexported (golint)
    • Line 325: warning: exported method Driver.ControllerGetCapabilities should have comment or be unexported (golint)
    • Line 341: warning: exported method Driver.CreateSnapshot should have comment or be unexported (golint)
    • Line 345: warning: exported method Driver.DeleteSnapshot should have comment or be unexported (golint)
    • Line 349: warning: exported method Driver.ListSnapshots should have comment or be unexported (golint)
    • Line 353: warning: exported method Driver.ControllerExpandVolume should have comment or be unexported (golint)
    • aws-efs-csi-driver/pkg/driver/driver.go
    • Line 36: warning: exported type Driver should have comment or be unexported (golint)
    • Line 53: warning: exported function NewDriver should have comment or be unexported (golint)
    • Line 78: warning: exported function SetNodeCapOptInFeatures should have comment or be unexported (golint)
    • Line 89: warning: exported method Driver.Run should have comment or be unexported (golint)
    • aws-efs-csi-driver/pkg/driver/mounter.go
    • Line 29: warning: exported type NodeMounter should have comment or be unexported (golint)
    • Line 39: warning: exported method NodeMounter.MakeDir should have comment or be unexported (golint)
    • Line 49: warning: exported method NodeMounter.GetDeviceName should have comment or be unexported (golint)
    • aws-efs-csi-driver/pkg/driver/version.go
    • Line 1: warning: package comment should be of the form "Package driver ..." (golint)
    • Line 28: warning: exported type VersionInfo should have comment or be unexported (golint)
    • Line 38: warning: exported function GetVersion should have comment or be unexported (golint)
    • Line 49: warning: exported function GetVersionJSON should have comment or be unexported (golint)
    • aws-efs-csi-driver/pkg/cloud/cloud.go
    • Line 33: warning: exported const AccessDeniedException should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 42: warning: exported type FileSystem should have comment or be unexported (golint)
    • Line 46: warning: exported type AccessPoint should have comment or be unexported (golint)
    • Line 55: warning: exported type AccessPointOptions should have comment or be unexported (golint)
    • Line 76: warning: exported type Cloud should have comment or be unexported (golint)
    • aws-efs-csi-driver/pkg/cloud/fakes.go
    • Line 10: warning: exported type FakeCloudProvider should have comment or be unexported (golint)
    • Line 16: warning: exported function NewFakeCloudProvider should have comment or be unexported (golint)
    • Line 24: warning: exported method FakeCloudProvider.GetMetadata should have comment or be unexported (golint)
    • Line 28: warning: exported method FakeCloudProvider.CreateAccessPoint should have comment or be unexported (golint)
    • Line 33: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 50: warning: exported method FakeCloudProvider.DeleteAccessPoint should have comment or be unexported (golint)
    • Line 59: warning: exported method FakeCloudProvider.DescribeAccessPoint should have comment or be unexported (golint)
    • Line 68: warning: comment on exported method FakeCloudProvider.DescribeFileSystem should be of the form "DescribeFileSystem ..." (golint)
    • aws-efs-csi-driver/test/e2e/e2e.go
    • Line 28: warning: comment on exported var ClusterName should be of the form "ClusterName ..." (golint)
    • Line 32: warning: exported var Region should have comment or be unexported (golint)
    • Line 60: warning: exported function InitEFSCSIDriver should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.

    • aws-efs-csi-driver/pkg/cloud/cloud_test.go
    • Line 12: warning: cannot find module providing package github.com/kubernetes-sigs/aws-efs-csi-driver/pkg/cloud/mocks: import lookup disabled by -mod=readonly (ineffassign)
    • Line 12: warning: could not import github.com/kubernetes-sigs/aws-efs-csi-driver/pkg/cloud/mocks (invalid package name: "") (ineffassign)

misspell93%

Misspell Finds commonly misspelled English words