Preparing report...

Report for github.com/aws/aws-k8s-tester

A+    Excellent!    Found 171 issues across 365 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!


golint70%

Golint is a linter for Go source code.

    • aws-k8s-tester/eksconfig/config.go
    • Line 556: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 563: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 606: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 612: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 663: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 668: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 722: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 728: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 777: warning: exported const DefaultCommandAfterCreateClusterTimeout should have comment (or a comment on this block) or be unexported (golint)
    • Line 938: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 1128: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 1326: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • aws-k8s-tester/k8s-tester/fluent-bit/tester.go
    • Line 1: warning: package comment should be of the form "Package fluent_bit ..." (golint)
    • Line 2: warning: don't use an underscore in package name (golint)
    • Line 20: warning: exported type Config should have comment or be unexported (golint)
    • Line 33: warning: exported function New should have comment or be unexported (golint)
    • aws-k8s-tester/ec2config/config.go
    • Line 204: warning: exported method Config.Colorize should have comment or be unexported (golint)
    • Line 219: warning: comment on exported const StatusDELETEDORNOTEXIST should be of the form "StatusDELETEDORNOTEXIST ..." (golint)
    • Line 223: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 446: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 452: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 486: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • Line 492: warning: receiver name cfg should be consistent with previous receiver name c for Config (golint)
    • aws-k8s-tester/pkg/cloud/rgt.go
    • Line 13: warning: exported const ResourceTypeELBLoadBalancer should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type RGT should have comment or be unexported (golint)
    • Line 25: warning: exported function NewRGT should have comment or be unexported (golint)
    • Line 50: warning: exported function NewRGTTagFilters should have comment or be unexported (golint)
    • Line 61: warning: exported function NewRGTTagFiltersV2 should have comment or be unexported (golint)
    • Line 72: warning: exported function ParseRGTTags should have comment or be unexported (golint)
    • aws-k8s-tester/eksconfig/add-on-stresser-remote-v2.go
    • Line 10: warning: exported type AddOnStresserRemoteV2 should have comment or be unexported (golint)
    • Line 72: warning: comment on exported method Config.IsEnabledAddOnStresserRemoteV2 should be of the form "IsEnabledAddOnStresserRemoteV2 ..." (golint)
    • Line 100: warning: exported method Config.GetAddOnStresserRemoteV2RepositoryRegion should have comment or be unexported (golint)
    • aws-k8s-tester/e2e/tester/pkg/eksctl.go
    • Line 17: warning: exported type EksctlClusterCreator should have comment or be unexported (golint)
    • Line 31: warning: exported function NewEksctlClusterCreator should have comment or be unexported (golint)
    • Line 41: warning: exported method EksctlClusterCreator.Init should have comment or be unexported (golint)
    • Line 63: warning: exported method EksctlClusterCreator.Up should have comment or be unexported (golint)
    • Line 76: warning: exported method EksctlClusterCreator.TearDown should have comment or be unexported (golint)
    • aws-k8s-tester/pkg/randutil/rand.go
    • Line 12: warning: exported function String should have comment or be unexported (golint)
    • Line 29: warning: exported function Bytes should have comment or be unexported (golint)
    • Line 33: warning: comment on exported function Hex should be of the form "Hex ..." (golint)
    • aws-k8s-tester/e2e/tester/framework.go
    • Line 23: warning: exported type Tester should have comment or be unexported (golint)
    • Line 33: warning: exported function NewTester should have comment or be unexported (golint)
    • Line 64: warning: exported method Tester.Start should have comment or be unexported (golint)
    • Line 114: warning: comment on exported function Start should be of the form "Start ..." (golint)
    • aws-k8s-tester/e2e/tester/pkg/steps.go
    • Line 11: warning: exported type Step should have comment or be unexported (golint)
    • Line 15: warning: exported type TestStep should have comment or be unexported (golint)
    • Line 20: warning: comment on exported method TestStep.Run should be of the form "Run ..." (golint)
    • Line 54: warning: exported type FuncStep should have comment or be unexported (golint)
    • Line 58: warning: exported method FuncStep.Run should have comment or be unexported (golint)
    • Line 62: warning: exported function EmptyStep should have comment or be unexported (golint)
    • aws-k8s-tester/client/pods.go
    • Line 18: warning: exported function ListPods should have comment or be unexported (golint)
    • Line 79: warning: comment on exported function CheckPodLogs should be of the form "CheckPodLogs ..." (golint)
    • aws-k8s-tester/e2e/framework/framework.go
    • Line 12: warning: should not use dot imports (golint)
    • Line 13: warning: should not use dot imports (golint)
    • Line 19: warning: comment on exported type Framework should be of the form "Framework ..." (with optional leading article) (golint)
    • Line 48: warning: comment on exported method Framework.BeforeEach should be of the form "BeforeEach ..." (golint)
    • Line 72: warning: comment on exported method Framework.AfterEach should be of the form "AfterEach ..." (golint)
    • aws-k8s-tester/eks/fluentd/fluentd.go
    • Line 322: warning: exported const TemplateFluentdConf should have comment or be unexported (golint)
    • Line 357: warning: exported const TemplateContainersConf should have comment or be unexported (golint)
    • Line 498: warning: exported const TemplateSystemdConf should have comment or be unexported (golint)
    • Line 587: warning: exported const TemplateHostConf should have comment or be unexported (golint)
    • aws-k8s-tester/pkg/aws/iam/iam.go
    • Line 29: warning: exported type AssumeRolePolicyDocument should have comment or be unexported (golint)
    • Line 34: warning: exported type AssumeRolePolicyDocumentSingle should have comment or be unexported (golint)
    • Line 39: warning: exported type AssumeRolePolicyDocumentStatement should have comment or be unexported (golint)
    • Line 49: warning: exported type AssumeRolePolicyDocumentStatementSingle should have comment or be unexported (golint)
    • aws-k8s-tester/e2e/framework/resource/node.go
    • Line 52: warning: exported type NodeManager should have comment or be unexported (golint)
    • Line 56: warning: exported function NewNodeManager should have comment or be unexported (golint)
    • Line 62: warning: exported method NodeManager.WaitNodeExists should have comment or be unexported (golint)
    • Line 87: warning: exported method NodeManager.WaitNodeReady should have comment or be unexported (golint)
    • aws-k8s-tester/e2e/tester/pkg/config.go
    • Line 3: warning: exported type TestConfig should have comment or be unexported (golint)
    • Line 12: warning: exported type Cluster should have comment or be unexported (golint)
    • Line 17: warning: exported type KopsCluster should have comment or be unexported (golint)
    • Line 28: warning: exported type EksCluster should have comment or be unexported (golint)
    • aws-k8s-tester/utils/spinner/spinner.go
    • Line 36: warning: exported type Spinner should have comment or be unexported (golint)
    • Line 42: warning: exported method Spinner.Restart should have comment or be unexported (golint)
    • Line 51: warning: exported method Spinner.Stop should have comment or be unexported (golint)
    • aws-k8s-tester/k8s-tester/fluent-bit/fluent-bit.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 281: warning: exported const FluentBitConf should have comment or be unexported (golint)
    • Line 294: warning: exported const InputConf should have comment or be unexported (golint)
    • Line 301: warning: exported const OutputConf should have comment or be unexported (golint)
    • Line 307: warning: exported const ParsersConf should have comment or be unexported (golint)
    • Line 685: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • aws-k8s-tester/e2e/framework/resource/job.go
    • Line 15: warning: exported type JobManager should have comment or be unexported (golint)
    • Line 19: warning: exported function NewJobManager should have comment or be unexported (golint)
    • Line 35: warning: exported method JobManager.WaitJobComplete should have comment or be unexported (golint)
    • aws-k8s-tester/pkg/k8s-client/eks-deprecate/deprecate.go
    • Line 59: warning: exported function ConvertAppsV1beta1ToAppsV1Deployment should have comment or be unexported (golint)
    • Line 108: warning: exported function ConvertAppsV1beta1ToAppsV1StatefulSet should have comment or be unexported (golint)
    • Line 161: warning: exported function ConvertAppsV1beta2ToAppsV1Deployment should have comment or be unexported (golint)
    • Line 209: warning: exported function ConvertAppsV1beta2ToAppsV1StatefulSet should have comment or be unexported (golint)
    • Line 262: warning: exported function ConvertExtensionsV1beta1ToAppsV1DaemonSet should have comment or be unexported (golint)
    • Line 305: warning: exported function ConvertExtensionsV1beta1ToAppsV1Deployment should have comment or be unexported (golint)
    • Line 354: warning: exported function ConvertExtensionsV1beta1ToAppsV1ReplicaSet should have comment or be unexported (golint)
    • Line 382: warning: exported function ConvertExtensionsV1beta1ToNetworkingV1NetworkPolicy should have comment or be unexported (golint)
    • Line 458: warning: exported function ConvertExtensionsV1beta1ToPolicyV1beta1PodSecurityPolicy should have comment or be unexported (golint)
    • aws-k8s-tester/utils/rand/rand.go
    • Line 12: warning: exported function String should have comment or be unexported (golint)
    • Line 29: warning: exported function Bytes should have comment or be unexported (golint)
    • Line 33: warning: comment on exported function Hex should be of the form "Hex ..." (golint)
    • aws-k8s-tester/e2e/framework/resource/namespace.go
    • Line 20: warning: exported const DefaultNamespaceDeletionTimeout should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type NamespaceManager should have comment or be unexported (golint)
    • Line 29: warning: exported function NewNamespaceManager should have comment or be unexported (golint)
    • Line 35: warning: exported method NamespaceManager.Cleanup should have comment or be unexported (golint)
    • Line 50: warning: exported method NamespaceManager.CreateNamespaceUnique should have comment or be unexported (golint)
    • Line 58: warning: exported method NamespaceManager.CreateNamespace should have comment or be unexported (golint)
    • aws-k8s-tester/client/utils.go
    • Line 68: warning: exported type Spinner should have comment or be unexported (golint)
    • Line 74: warning: exported method Spinner.Restart should have comment or be unexported (golint)
    • Line 83: warning: exported method Spinner.Stop should have comment or be unexported (golint)
    • aws-k8s-tester/pkg/spinner/spinner.go
    • Line 36: warning: exported type Spinner should have comment or be unexported (golint)
    • Line 42: warning: exported method Spinner.Restart should have comment or be unexported (golint)
    • Line 51: warning: exported method Spinner.Stop should have comment or be unexported (golint)
    • aws-k8s-tester/pkg/metrics/metrics.go
    • Line 35: warning: exported method RequestsCompare.JSON should have comment or be unexported (golint)
    • Line 40: warning: exported method RequestsCompare.Table should have comment or be unexported (golint)
    • Line 153: warning: exported method RequestsSummary.JSON should have comment or be unexported (golint)
    • Line 158: warning: exported method RequestsSummary.Table should have comment or be unexported (golint)
    • Line 196: warning: exported type DurationWithLabels should have comment or be unexported (golint)
    • Line 284: warning: exported method DurationWithLabels.CSV should have comment or be unexported (golint)
    • Line 318: warning: exported type Durations should have comment or be unexported (golint)
    • Line 419: warning: exported type HistogramBuckets should have comment or be unexported (golint)
    • Line 533: warning: comment on exported function DownloadDurationsFromS3 should be of the form "DownloadDurationsFromS3 ..." (golint)
    • aws-k8s-tester/e2e/tester/pkg/kops.go
    • Line 16: warning: exported type KopsClusterCreator should have comment or be unexported (golint)
    • Line 30: warning: exported function NewKopsClusterCreator should have comment or be unexported (golint)
    • Line 40: warning: exported method KopsClusterCreator.Init should have comment or be unexported (golint)
    • Line 61: warning: exported method KopsClusterCreator.Up should have comment or be unexported (golint)
    • Line 82: warning: exported method KopsClusterCreator.TearDown should have comment or be unexported (golint)
    • aws-k8s-tester/e2e/framework/options.go
    • Line 19: warning: exported type Options should have comment or be unexported (golint)
    • Line 26: warning: exported method Options.BindFlags should have comment or be unexported (golint)
    • Line 33: warning: exported method Options.Validate should have comment or be unexported (golint)
    • aws-k8s-tester/pkg/cloud/config.go
    • Line 18: warning: exported type Config should have comment or be unexported (golint)
    • Line 26: warning: exported method Config.BindFlags should have comment or be unexported (golint)
    • Line 38: warning: exported method Config.BindEnv should have comment or be unexported (golint)
    • Line 71: warning: exported method Config.Validate should have comment or be unexported (golint)
    • aws-k8s-tester/e2e/framework/resource/daemonset.go
    • Line 15: warning: exported type DaemonSetManager should have comment or be unexported (golint)
    • Line 19: warning: exported function NewDaemonSetManager should have comment or be unexported (golint)
    • Line 25: warning: exported method DaemonSetManager.WaitDaemonSetReady should have comment or be unexported (golint)

gocyclo73%

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.

    • aws-k8s-tester/eks/cluster/vpc.go
    • Line 650: warning: cyclomatic complexity 57 of function (*tester).createVPC() is high (> 15) (gocyclo)
    • Line 1289: warning: cyclomatic complexity 27 of function (*tester).deleteSGs() is high (> 15) (gocyclo)
    • Line 978: warning: cyclomatic complexity 18 of function (*tester).deleteVPC() is high (> 15) (gocyclo)
    • Line 1178: warning: cyclomatic complexity 16 of function (*tester).deleteENIs() is high (> 15) (gocyclo)
    • aws-k8s-tester/eksconfig/env.go
    • Line 19: warning: cyclomatic complexity 128 of function (*Config).UpdateFromEnvs() is high (> 15) (gocyclo)
    • Line 583: warning: cyclomatic complexity 38 of function parseEnvs() is high (> 15) (gocyclo)
    • aws-k8s-tester/eksconfig/config.go
    • Line 1128: warning: cyclomatic complexity 61 of function (*Config).validateConfig() is high (> 15) (gocyclo)
    • Line 938: warning: cyclomatic complexity 55 of function (*Config).ValidateAndSetDefaults() is high (> 15) (gocyclo)
    • Line 1326: warning: cyclomatic complexity 49 of function (*Config).validateParameters() is high (> 15) (gocyclo)
    • Line 563: warning: cyclomatic complexity 16 of function (*Config).evaluateCommandRefs() is high (> 15) (gocyclo)
    • aws-k8s-tester/eks/eks.go
    • Line 943: warning: cyclomatic complexity 103 of function (*Tester).Up() is high (> 15) (gocyclo)
    • Line 202: warning: cyclomatic complexity 38 of function New() is high (> 15) (gocyclo)
    • Line 1543: warning: cyclomatic complexity 25 of function (*Tester).down() is high (> 15) (gocyclo)
    • aws-k8s-tester/eks/mng/nodes.go
    • Line 138: warning: cyclomatic complexity 44 of function (*tester).createASGs() is high (> 15) (gocyclo)
    • Line 509: warning: cyclomatic complexity 22 of function (*tester).deleteASG() is high (> 15) (gocyclo)
    • aws-k8s-tester/ec2/vpc.go
    • Line 602: warning: cyclomatic complexity 44 of function (*Tester).createVPC() is high (> 15) (gocyclo)
    • Line 1164: warning: cyclomatic complexity 27 of function (*Tester).deleteSGs() is high (> 15) (gocyclo)
    • Line 863: warning: cyclomatic complexity 18 of function (*Tester).deleteVPC() is high (> 15) (gocyclo)
    • Line 1054: warning: cyclomatic complexity 16 of function (*Tester).deleteENIs() is high (> 15) (gocyclo)
    • aws-k8s-tester/eks/cluster/cluster.go
    • Line 297: warning: cyclomatic complexity 33 of function (*tester).createEKS() is high (> 15) (gocyclo)
    • Line 687: warning: cyclomatic complexity 23 of function (*tester).updateClusterStatus() is high (> 15) (gocyclo)
    • Line 836: warning: cyclomatic complexity 18 of function (*tester).createClient() is high (> 15) (gocyclo)
    • aws-k8s-tester/eks/stresser/stresser.go
    • Line 503: warning: cyclomatic complexity 47 of function startReads() is high (> 15) (gocyclo)
    • Line 192: warning: cyclomatic complexity 30 of function (*loader).CollectMetrics() is high (> 15) (gocyclo)
    • Line 367: warning: cyclomatic complexity 19 of function startWrites() is high (> 15) (gocyclo)

ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell0%

Misspell Finds commonly misspelled English words

An error occurred while running this test (exit status 2)