Preparing report...

Report for github.com/openshift/cloud-ingress-operator

A+    Excellent!    Found 21 issues across 47 files

Tweet

gofmt95%

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!


gocyclo87%

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.


golint68%

Golint is a linter for Go source code.

    • cloud-ingress-operator/pkg/awsclient/client.go
    • Line 104: warning: exported type AwsClient should have comment or be unexported (golint)
    • Line 111: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 183: warning: exported method AwsClient.ApplySecurityGroupsToLoadBalancer should have comment or be unexported (golint)
    • Line 187: warning: exported method AwsClient.ConfigureHealthCheck should have comment or be unexported (golint)
    • Line 191: warning: exported method AwsClient.CreateLoadBalancer should have comment or be unexported (golint)
    • Line 195: warning: exported method AwsClient.CreateLoadBalancerListeners should have comment or be unexported (golint)
    • Line 199: warning: exported method AwsClient.DeleteLoadBalancerListeners should have comment or be unexported (golint)
    • Line 203: warning: exported method AwsClient.DeregisterInstancesFromLoadBalancer should have comment or be unexported (golint)
    • Line 206: warning: exported method AwsClient.DescribeLoadBalancers should have comment or be unexported (golint)
    • Line 210: warning: exported method AwsClient.DescribeLoadBalancersV2 should have comment or be unexported (golint)
    • Line 214: warning: exported method AwsClient.DeleteLoadBalancerV2 should have comment or be unexported (golint)
    • Line 218: warning: exported method AwsClient.CreateLoadBalancerV2 should have comment or be unexported (golint)
    • Line 222: warning: exported method AwsClient.CreateTargetGroupV2 should have comment or be unexported (golint)
    • Line 226: warning: exported method AwsClient.RegisterTargetsV2 should have comment or be unexported (golint)
    • Line 230: warning: exported method AwsClient.CreateListenerV2 should have comment or be unexported (golint)
    • Line 234: warning: exported method AwsClient.DescribeTags should have comment or be unexported (golint)
    • Line 237: warning: exported method AwsClient.RegisterInstancesWithLoadBalancer should have comment or be unexported (golint)
    • Line 241: warning: exported method AwsClient.DescribeTargetGroupsV2 should have comment or be unexported (golint)
    • Line 245: warning: exported method AwsClient.AddTagsV2 should have comment or be unexported (golint)
    • Line 249: warning: exported method AwsClient.ChangeResourceRecordSets should have comment or be unexported (golint)
    • Line 252: warning: exported method AwsClient.ListHostedZonesByName should have comment or be unexported (golint)
    • Line 256: warning: exported method AwsClient.AuthorizeSecurityGroupIngress should have comment or be unexported (golint)
    • Line 259: warning: exported method AwsClient.CreateSecurityGroup should have comment or be unexported (golint)
    • Line 262: warning: exported method AwsClient.DeleteSecurityGroup should have comment or be unexported (golint)
    • Line 265: warning: exported method AwsClient.DescribeSecurityGroups should have comment or be unexported (golint)
    • Line 268: warning: exported method AwsClient.RevokeSecurityGroupIngress should have comment or be unexported (golint)
    • Line 271: warning: exported method AwsClient.DescribeSubnets should have comment or be unexported (golint)
    • Line 274: warning: exported method AwsClient.CreateTags should have comment or be unexported (golint)
    • cloud-ingress-operator/config/config.go
    • Line 43: warning: comment on exported const AdminAPIListenerPort should be of the form "AdminAPIListenerPort ..." (golint)
    • Line 46: warning: comment on exported const MaxAPIRetries should be of the form "MaxAPIRetries ..." (golint)
    • Line 49: warning: comment on exported const AWSSecretName should be of the form "AWSSecretName ..." (golint)
    • Line 52: warning: comment on exported const GCPSecretName should be of the form "GCPSecretName ..." (golint)
    • Line 55: warning: comment on exported const OperatorNamespace should be of the form "OperatorNamespace ..." (golint)
    • cloud-ingress-operator/pkg/testutils/testutils.go
    • Line 26: warning: exported const DefaultRegionName should have comment or be unexported (golint)
    • Line 27: warning: exported const DefaultAzName should have comment or be unexported (golint)
    • Line 28: warning: exported const DefaultAPIEndpoint should have comment or be unexported (golint)
    • Line 29: warning: exported const DefaultClusterDomain should have comment or be unexported (golint)
    • Line 35: warning: exported type Mocks should have comment or be unexported (golint)
    • Line 95: warning: comment on exported function NewTestMock should be of the form "NewTestMock ..." (golint)
    • cloud-ingress-operator/pkg/controller/sshd/sshd_controller.go
    • Line 114: warning: exported const ELBAnnotationKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 255: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 317: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 380: warning: don't use underscores in Go names; var ssh_host_rsa_key should be sshHostRsaKey (golint)
    • cloud-ingress-operator/pkg/errors/errors.go
    • Line 7: warning: exported type LoadBalancerNotReadyError should have comment or be unexported (golint)
    • Line 13: warning: exported function NewLoadBalancerNotReadyError should have comment or be unexported (golint)
    • Line 19: warning: exported type DnsUpdateError should have comment or be unexported (golint)
    • Line 25: warning: exported function NewDNSUpdateError should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell95%

Misspell Finds commonly misspelled English words