Preparing report...

Report for github.com/aws/amazon-vpc-resource-controller-k8s

A+    Excellent!    Found 83 issues across 260 files

Tweet

gofmt98%

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!


gocyclo91%

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.


golint77%

Golint is a linter for Go source code.

    • amazon-vpc-resource-controller-k8s/pkg/aws/ec2/api/helper.go
    • Line 29: warning: exported const CreateENIDescriptionPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 66: warning: exported function NewEC2APIHelper should have comment or be unexported (golint)
    • Line 76: warning: exported type EC2APIHelper should have comment or be unexported (golint)
    • Line 407: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • amazon-vpc-resource-controller-k8s/test/framework/manifest/service.go
    • Line 22: warning: exported type ServiceBuilder should have comment or be unexported (golint)
    • Line 32: warning: exported function NewHTTPService should have comment or be unexported (golint)
    • Line 40: warning: exported method ServiceBuilder.Name should have comment or be unexported (golint)
    • Line 45: warning: exported method ServiceBuilder.Namespace should have comment or be unexported (golint)
    • Line 50: warning: exported method ServiceBuilder.Port should have comment or be unexported (golint)
    • Line 55: warning: exported method ServiceBuilder.NodePort should have comment or be unexported (golint)
    • Line 60: warning: exported method ServiceBuilder.Protocol should have comment or be unexported (golint)
    • Line 65: warning: exported method ServiceBuilder.Selector should have comment or be unexported (golint)
    • Line 70: warning: exported method ServiceBuilder.ServiceType should have comment or be unexported (golint)
    • Line 75: warning: exported method ServiceBuilder.Build should have comment or be unexported (golint)
    • amazon-vpc-resource-controller-k8s/test/framework/manifest/deployment.go
    • Line 25: warning: exported type DeploymentBuilder should have comment or be unexported (golint)
    • Line 35: warning: exported function NewDefaultDeploymentBuilder should have comment or be unexported (golint)
    • Line 47: warning: exported function NewWindowsDeploymentBuilder should have comment or be unexported (golint)
    • Line 57: warning: exported method DeploymentBuilder.Namespace should have comment or be unexported (golint)
    • Line 62: warning: exported method DeploymentBuilder.TerminationGracePeriod should have comment or be unexported (golint)
    • Line 67: warning: exported method DeploymentBuilder.Name should have comment or be unexported (golint)
    • Line 72: warning: exported method DeploymentBuilder.Replicas should have comment or be unexported (golint)
    • Line 77: warning: exported method DeploymentBuilder.OS should have comment or be unexported (golint)
    • Line 82: warning: exported method DeploymentBuilder.Container should have comment or be unexported (golint)
    • Line 87: warning: exported method DeploymentBuilder.PodLabel should have comment or be unexported (golint)
    • Line 92: warning: exported method DeploymentBuilder.Build should have comment or be unexported (golint)
    • amazon-vpc-resource-controller-k8s/pkg/worker/jobs.go
    • Line 22: warning: exported const OperationProcessDeleteQueue should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: comment on exported const OperationDeleted should be of the form "OperationDeleted ..." (golint)
    • Line 53: warning: comment on exported function NewOnDemandCreateJob should be of the form "NewOnDemandCreateJob ..." (golint)
    • Line 63: warning: comment on exported function NewOnDemandDeletedJob should be of the form "NewOnDemandDeletedJob ..." (golint)
    • Line 72: warning: comment on exported function NewOnDemandReconcileNodeJob should be of the form "NewOnDemandReconcileNodeJob ..." (golint)
    • Line 117: warning: exported function NewWarmPoolDeleteJob should have comment or be unexported (golint)
    • Line 126: warning: exported function NewWarmProcessDeleteQueueJob should have comment or be unexported (golint)
    • amazon-vpc-resource-controller-k8s/test/framework/manifest/jobs.go
    • Line 23: warning: exported type JobBuilder should have comment or be unexported (golint)
    • Line 33: warning: exported function NewWindowsJob should have comment or be unexported (golint)
    • Line 43: warning: exported method JobBuilder.Name should have comment or be unexported (golint)
    • Line 48: warning: exported method JobBuilder.Namespace should have comment or be unexported (golint)
    • Line 53: warning: exported method JobBuilder.OS should have comment or be unexported (golint)
    • Line 58: warning: exported method JobBuilder.Container should have comment or be unexported (golint)
    • Line 63: warning: exported method JobBuilder.PodLabels should have comment or be unexported (golint)
    • Line 68: warning: exported method JobBuilder.TerminationGracePeriod should have comment or be unexported (golint)
    • Line 73: warning: exported method JobBuilder.Parallelism should have comment or be unexported (golint)
    • Line 78: warning: exported method JobBuilder.Build should have comment or be unexported (golint)
    • amazon-vpc-resource-controller-k8s/test/framework/manifest/pod.go
    • Line 24: warning: exported type PodBuilder should have comment or be unexported (golint)
    • Line 36: warning: exported method PodBuilder.Build should have comment or be unexported (golint)
    • Line 54: warning: exported function NewDefaultPodBuilder should have comment or be unexported (golint)
    • Line 67: warning: exported function NewWindowsPodBuilder should have comment or be unexported (golint)
    • Line 77: warning: exported method PodBuilder.Namespace should have comment or be unexported (golint)
    • Line 82: warning: exported method PodBuilder.Name should have comment or be unexported (golint)
    • Line 87: warning: exported method PodBuilder.Container should have comment or be unexported (golint)
    • Line 92: warning: exported method PodBuilder.OS should have comment or be unexported (golint)
    • Line 97: warning: exported method PodBuilder.RestartPolicy should have comment or be unexported (golint)
    • Line 102: warning: exported method PodBuilder.Labels should have comment or be unexported (golint)
    • Line 107: warning: exported method PodBuilder.Annotations should have comment or be unexported (golint)
    • Line 112: warning: exported method PodBuilder.ServiceAccount should have comment or be unexported (golint)
    • Line 117: warning: exported method PodBuilder.TerminationGracePeriod should have comment or be unexported (golint)
    • amazon-vpc-resource-controller-k8s/test/framework/manifest/sgp.go
    • Line 25: warning: exported type SGPBuilder should have comment or be unexported (golint)
    • Line 33: warning: exported function NewSGPBuilder should have comment or be unexported (golint)
    • Line 43: warning: exported method SGPBuilder.Name should have comment or be unexported (golint)
    • Line 48: warning: exported method SGPBuilder.Namespace should have comment or be unexported (golint)
    • Line 53: warning: exported method SGPBuilder.SecurityGroup should have comment or be unexported (golint)
    • Line 58: warning: exported method SGPBuilder.PodMatchLabel should have comment or be unexported (golint)
    • Line 69: warning: exported method SGPBuilder.ServiceAccountMatchLabel should have comment or be unexported (golint)
    • Line 80: warning: exported method SGPBuilder.ServiceAccountMatchExpression should have comment or be unexported (golint)
    • Line 95: warning: exported method SGPBuilder.Build should have comment or be unexported (golint)
    • Line 116: warning: exported method SGPBuilder.PodMatchExpression should have comment or be unexported (golint)
    • amazon-vpc-resource-controller-k8s/test/framework/manifest/serviceaccount.go
    • Line 23: warning: exported type ServiceAccountBuilder should have comment or be unexported (golint)
    • Line 29: warning: exported function NewServiceAccountBuilder should have comment or be unexported (golint)
    • Line 36: warning: exported method ServiceAccountBuilder.Name should have comment or be unexported (golint)
    • Line 41: warning: exported method ServiceAccountBuilder.Namespace should have comment or be unexported (golint)
    • Line 46: warning: exported method ServiceAccountBuilder.Label should have comment or be unexported (golint)
    • Line 54: warning: exported method ServiceAccountBuilder.Build should have comment or be unexported (golint)
    • amazon-vpc-resource-controller-k8s/test/framework/verify/pod.go
    • Line 24: warning: should not use dot imports (golint)
    • Line 25: warning: should not use dot imports (golint)
    • Line 29: warning: exported type PodVerification should have comment or be unexported (golint)
    • Line 34: warning: context.Context should be the first parameter of a function (golint)
    • Line 34: warning: exported function NewPodVerification should have comment or be unexported (golint)
    • Line 41: warning: exported method PodVerification.PodHasExpectedSG should have comment or be unexported (golint)
    • Line 58: warning: exported method PodVerification.PodsHaveExpectedSG should have comment or be unexported (golint)
    • Line 70: warning: exported method PodVerification.PodHasNoBranchENIAnnotationInjected should have comment or be unexported (golint)
    • Line 76: warning: exported method PodVerification.WindowsPodsHaveExpectedIPv4Address should have comment or be unexported (golint)
    • Line 87: warning: exported method PodVerification.WindowsPodHaveExpectedIPv4Address should have comment or be unexported (golint)
    • amazon-vpc-resource-controller-k8s/test/framework/manifest/eniconfig.go
    • Line 25: warning: exported type ENIConfigBuilder should have comment or be unexported (golint)
    • Line 31: warning: exported function NewENIConfigBuilder should have comment or be unexported (golint)
    • Line 37: warning: exported method ENIConfigBuilder.Name should have comment or be unexported (golint)
    • Line 42: warning: exported method ENIConfigBuilder.SubnetID should have comment or be unexported (golint)
    • Line 47: warning: exported method ENIConfigBuilder.SecurityGroup should have comment or be unexported (golint)
    • Line 52: warning: exported method ENIConfigBuilder.Build should have comment or be unexported (golint)
    • amazon-vpc-resource-controller-k8s/pkg/config/loader.go
    • Line 17: warning: exported const WorkQueueDefaultMaxRetries should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: comment on exported const PodENIDefaultWorker should be of the form "PodENIDefaultWorker ..." (golint)
    • Line 22: warning: comment on exported const IPv4DefaultWorker should be of the form "IPv4DefaultWorker ..." (golint)
    • Line 28: warning: comment on exported const UserServiceClientQPS should be of the form "UserServiceClientQPS ..." (golint)
    • Line 32: warning: comment on exported const InstanceServiceClientQPS should be of the form "InstanceServiceClientQPS ..." (golint)
    • Line 36: warning: comment on exported const DefaultAPIServerQPS should be of the form "DefaultAPIServerQPS ..." (golint)
    • amazon-vpc-resource-controller-k8s/test/framework/manifest/container.go
    • Line 20: warning: exported type Container should have comment or be unexported (golint)
    • Line 28: warning: exported function NewBusyBoxContainerBuilder should have comment or be unexported (golint)
    • Line 38: warning: exported function NewWindowsContainerBuilder should have comment or be unexported (golint)
    • Line 48: warning: exported method Container.Name should have comment or be unexported (golint)
    • Line 53: warning: exported method Container.Image should have comment or be unexported (golint)
    • Line 58: warning: exported method Container.ImagePullPolicy should have comment or be unexported (golint)
    • Line 63: warning: exported method Container.Command should have comment or be unexported (golint)
    • Line 68: warning: exported method Container.Args should have comment or be unexported (golint)
    • Line 73: warning: exported method Container.Build should have comment or be unexported (golint)
    • amazon-vpc-resource-controller-k8s/pkg/provider/branch/trunk/trunk.go
    • Line 46: warning: exported var InterfaceTypeTrunk should have comment or be unexported (golint)
    • Line 52: warning: exported var ErrCurrentlyAtMaxCapacity should have comment or be unexported (golint)
    • Line 68: warning: exported type TrunkENI should have comment or be unexported (golint)
    • Line 105: warning: comment on exported type ENIDetails should be of the form "ENIDetails ..." (with optional leading article) (golint)
    • Line 140: warning: exported function PrometheusRegister 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