Preparing report...

Report for github.com/rogaha/devops

A    Great!    Found 20 issues across 33 files

Tweet

gofmt84%

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!


gocyclo75%

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.

    • devops/pkg/devdeploy/infrastructure_aws.go
    • Line 500: warning: cyclomatic complexity 98 of function (*Infrastructure).setupAwsS3Buckets() is high (> 15) (gocyclo)
    • Line 3170: warning: cyclomatic complexity 72 of function (*Infrastructure).setupAwsElbLoadBalancer() is high (> 15) (gocyclo)
    • Line 188: warning: cyclomatic complexity 45 of function (*Infrastructure).setupAwsIamPolicy() is high (> 15) (gocyclo)
    • Line 1873: warning: cyclomatic complexity 43 of function (*Infrastructure).setupAwsRdsDbInstance() is high (> 15) (gocyclo)
    • Line 2169: warning: cyclomatic complexity 42 of function (*Infrastructure).setupAwsEcsService() is high (> 15) (gocyclo)
    • Line 1651: warning: cyclomatic complexity 40 of function (*Infrastructure).setupAwsRdsDbCluster() is high (> 15) (gocyclo)
    • Line 3639: warning: cyclomatic complexity 39 of function (*Infrastructure).setupAwsCloudwatchEventRule() is high (> 15) (gocyclo)
    • Line 1347: warning: cyclomatic complexity 38 of function (*Infrastructure).setupAwsElasticCacheCluster() is high (> 15) (gocyclo)
    • Line 1008: warning: cyclomatic complexity 38 of function (*Infrastructure).setupAwsEc2Vpc() is high (> 15) (gocyclo)
    • Line 2436: warning: cyclomatic complexity 34 of function (*Infrastructure).setupAwsRoute53Zones() is high (> 15) (gocyclo)
    • Line 1206: warning: cyclomatic complexity 27 of function (*Infrastructure).setupAwsEc2SecurityGroup() is high (> 15) (gocyclo)
    • Line 3866: warning: cyclomatic complexity 27 of function (*Infrastructure).setupAwsSQSQueue() is high (> 15) (gocyclo)
    • Line 2979: warning: cyclomatic complexity 22 of function (*Infrastructure).setupAwsAcmCertificate() is high (> 15) (gocyclo)
    • Line 2684: warning: cyclomatic complexity 20 of function (*Infrastructure).setupAwsSdPrivateDnsNamespace() is high (> 15) (gocyclo)

golint57%

Golint is a linter for Go source code.

    • devops/pkg/devdeploy/cloudfront.go
    • Line 14: warning: exported function CloudFrontDistribution should have comment or be unexported (golint)
    • Line 63: warning: comment on exported function S3UrlFormatter should be of the form "S3UrlFormatter ..." (golint)
    • devops/pkg/devdeploy/infrastructure.go
    • Line 33: warning: exported type SetupOption should have comment or be unexported (golint)
    • Line 38: warning: exported const SetupOptionSkipCache should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: exported type SetupOptions should have comment or be unexported (golint)
    • Line 322: warning: comment on exported function SetupInfrastructure should be of the form "SetupInfrastructure ..." (golint)
    • Line 728: warning: receiver name infra should be consistent with previous receiver name i for Infrastructure (golint)
    • devops/pkg/devdeploy/models.go
    • Line 44: warning: comment on exported type DBConnInfo should be of the form "DBConnInfo ..." (with optional leading article) (golint)
    • Line 720: warning: comment on exported type AwsElasticCacheNode should be of the form "AwsElasticCacheNode ..." (with optional leading article) (golint)
    • Line 1431: warning: comment on exported type AwsEcsServiceDeployVariables should be of the form "AwsEcsServiceDeployVariables ..." (with optional leading article) (golint)
    • Line 2409: warning: comment on exported method AwsAppAutoscalingPolicy.PutInput should be of the form "PutInput ..." (golint)
    • Line 2428: warning: comment on exported method AwsAppAutoscalingPolicy.RegisterTargetInput should be of the form "RegisterTargetInput ..." (golint)
    • Line 2953: warning: comment on exported type AwsCloudwatchEventTargetResult should be of the form "AwsCloudwatchEventTargetResult ..." (with optional leading article) (golint)
    • devops/pkg/devdeploy/secrets_manager.go
    • Line 11: warning: exported var ErrSecreteNotFound should have comment or be unexported (golint)
    • Line 33: warning: comment on exported function SecretManagerGetBinary should be of the form "SecretManagerGetBinary ..." (golint)
    • devops/pkg/devdeploy/aws.go
    • Line 24: warning: exported const AwsRegistryMaximumImages should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: comment on exported function GetAwsCredentialsFromEnv should be of the form "GetAwsCredentialsFromEnv ..." (golint)
    • devops/pkg/devdeploy/infrastructure_aws.go
    • Line 42: warning: exported const AwsSecurityGroupSourceGroupSelf should have comment or be unexported (golint)
    • Line 43: warning: exported const SSEAlgorithm should have comment or be unexported (golint)
    • Line 1001: warning: comment on exported method Infrastructure.GetAwsEc2DefaultVpc should be of the form "GetAwsEc2DefaultVpc ..." (golint)
    • Line 1269: warning: should omit 2nd value from range; this loop is equivalent to `for gn := range ...` (golint)
    • Line 1549: warning: exported method Infrastructure.GetDBConnInfo should have comment or be unexported (golint)
    • Line 1578: warning: exported method Infrastructure.SaveDbConnInfo should have comment or be unexported (golint)
    • Line 2467: warning: should omit 2nd value from range; this loop is equivalent to `for zoneID := range ...` (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell90%

Misspell Finds commonly misspelled English words