Preparing report...

Report for github.com/jonhadfield/ape

A+    Excellent!    Found 29 issues across 42 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!


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.

    • ape/ec2.go
    • Line 442: warning: cyclomatic complexity 38 of function enforceSecurityGroupPolicy() is high (> 15) (gocyclo)
    • ape/iam.go
    • Line 883: warning: cyclomatic complexity 33 of function filterPasswordPolicy() is high (> 15) (gocyclo)
    • Line 1153: warning: cyclomatic complexity 30 of function enforceUserPolicy() is high (> 15) (gocyclo)
    • Line 1552: warning: cyclomatic complexity 22 of function checkPolicyDocumentsAgainstFilters() is high (> 15) (gocyclo)
    • Line 1630: warning: cyclomatic complexity 21 of function enforcePolicy() is high (> 15) (gocyclo)
    • Line 328: warning: cyclomatic complexity 21 of function getCredentialReport() is high (> 15) (gocyclo)
    • Line 1101: warning: cyclomatic complexity 18 of function processIAMErrors() is high (> 15) (gocyclo)
    • Line 1393: warning: cyclomatic complexity 17 of function enforceRolePolicy() is high (> 15) (gocyclo)
    • ape/config.go
    • Line 124: warning: cyclomatic complexity 25 of function enforceConfigPolicy() is high (> 15) (gocyclo)
    • ape/report.go
    • Line 559: warning: cyclomatic complexity 24 of function reportItem() is high (> 15) (gocyclo)
    • Line 141: warning: cyclomatic complexity 17 of function (enforcePlanOutput).printToMDTable() is high (> 15) (gocyclo)
    • Line 433: warning: cyclomatic complexity 16 of function (enforcePlanOutput).emailResults() is high (> 15) (gocyclo)
    • ape/vpc.go
    • Line 144: warning: cyclomatic complexity 23 of function enforceVpcPolicy() is high (> 15) (gocyclo)
    • ape/s3.go
    • Line 391: warning: cyclomatic complexity 32 of function enforceS3BucketPolicy() is high (> 15) (gocyclo)
    • ape/plan.go
    • Line 189: warning: cyclomatic complexity 29 of function CreatePlan() is high (> 15) (gocyclo)
    • ape/enforce.go
    • Line 352: warning: cyclomatic complexity 20 of function (plan).Enforce() is high (> 15) (gocyclo)
    • Line 183: warning: cyclomatic complexity 18 of function getIssuesSummary() is high (> 15) (gocyclo)
    • Line 236: warning: cyclomatic complexity 16 of function (PlanItem).enforce() is high (> 15) (gocyclo)
    • ape/kms.go
    • Line 207: warning: cyclomatic complexity 16 of function enforceKmsPolicy() is high (> 15) (gocyclo)

golint50%

Golint is a linter for Go source code.

    • ape/helpers/parsing.go
    • Line 27: warning: exported function GetResourceParts should have comment or be unexported (golint)
    • Line 38: warning: exported function GetignoredResourceParts should have comment or be unexported (golint)
    • ape/root/aws.go
    • Line 19: warning: exported type Role should have comment or be unexported (golint)
    • Line 25: warning: exported type Account should have comment or be unexported (golint)
    • Line 31: warning: exported type Accounts should have comment or be unexported (golint)
    • ape/root/globals.go
    • Line 19: warning: exported var VerboseErrors should have comment or be unexported (golint)
    • Line 20: warning: exported var StopOnError should have comment or be unexported (golint)
    • ape/helpers/strings.go
    • Line 26: warning: exported function StringInSlice should have comment or be unexported (golint)
    • Line 35: warning: exported function StringSliceToLower should have comment or be unexported (golint)
    • Line 40: warning: exported function StringInSliceContents should have comment or be unexported (golint)
    • Line 49: warning: exported function PadToWidth should have comment or be unexported (golint)
    • Line 98: warning: exported function GetStringInBetween should have comment or be unexported (golint)
    • ape/report.go
    • Line 40: warning: exported function ListSupported should have comment or be unexported (golint)
    • ape/root/time.go
    • Line 27: warning: exported function ProcessTimeFilterValue should have comment or be unexported (golint)
    • ape/presets/presets.go
    • Line 35: warning: exported function List should have comment or be unexported (golint)
    • Line 42: warning: exported function Generate should have comment or be unexported (golint)
    • Line 108: warning: exported function Load should have comment or be unexported (golint)
    • ape/helpers/numbers.go
    • Line 23: warning: exported function ToInt64 should have comment or be unexported (golint)
    • Line 34: warning: exported function NumBetween should have comment or be unexported (golint)
    • ape/mocks/testing.go
    • Line 69: warning: exported type MockIAMClient should have comment or be unexported (golint)
    • Line 73: warning: exported method MockIAMClient.GetAccountPasswordPolicy should have comment or be unexported (golint)
    • Line 98: warning: exported method MockIAMClient.ListAttachedRolePolicies should have comment or be unexported (golint)
    • Line 111: warning: exported method MockIAMClient.GetLoginProfile should have comment or be unexported (golint)
    • Line 125: warning: exported method MockIAMClient.ListMFADevicesOutput should have comment or be unexported (golint)
    • Line 139: warning: exported method MockIAMClient.ListMFADevices should have comment or be unexported (golint)
    • Line 155: warning: exported method MockIAMClient.ListAccessKeys should have comment or be unexported (golint)
    • Line 179: warning: exported method MockIAMClient.GetAccessKeyLastUsed should have comment or be unexported (golint)
    • Line 193: warning: exported type MockIAMClient2 should have comment or be unexported (golint)
    • Line 197: warning: exported method MockIAMClient2.ListMFADevices should have comment or be unexported (golint)
    • ape/enforce.go
    • Line 45: warning: exported type EnforcePlanInput should have comment or be unexported (golint)
    • ape/plan.go
    • Line 55: warning: exported type PlanItem should have comment or be unexported (golint)
    • Line 63: warning: exported type CreatePlanInput should have comment or be unexported (golint)
    • Line 72: warning: exported type CreatePlanOutput should have comment or be unexported (golint)
    • Line 164: warning: exported type LoadConfigsInput should have comment or be unexported (golint)
    • Line 189: warning: exported function CreatePlan should have comment or be unexported (golint)
    • ape/root/aws/s3/s3.go
    • Line 23: warning: exported type PolicyDocument should have comment or be unexported (golint)
    • Line 28: warning: exported type StatementEntry should have comment or be unexported (golint)
    • Line 36: warning: exported type Policy should have comment or be unexported (golint)
    • Line 41: warning: exported type PolicyStatement should have comment or be unexported (golint)
    • ape/root/aws/iam/iam.go
    • Line 24: warning: exported type Policy should have comment or be unexported (golint)
    • Line 31: warning: exported type PolicyDocument should have comment or be unexported (golint)
    • Line 37: warning: exported type PolicyStatement should have comment or be unexported (golint)
    • Line 43: warning: exported type RawPolicyDocument should have comment or be unexported (golint)
    • Line 48: warning: exported type RawStatementEntry should have comment or be unexported (golint)
    • ape/helpers/authentication.go
    • Line 30: warning: exported function GetSession should have comment or be unexported (golint)
    • Line 39: warning: exported type GetAssumeRoleCredsInput should have comment or be unexported (golint)
    • Line 47: warning: exported function GetAssumeRoleCreds should have comment or be unexported (golint)
    • ape/helpers/catalogue.go
    • Line 19: warning: exported type Criterion should have comment or be unexported (golint)
    • Line 25: warning: exported type Criteria should have comment or be unexported (golint)
    • Line 27: warning: exported type Resource should have comment or be unexported (golint)
    • Line 32: warning: exported type Resources should have comment or be unexported (golint)
    • Line 34: warning: exported type Service should have comment or be unexported (golint)
    • Line 39: warning: exported type Services should have comment or be unexported (golint)
    • Line 448: warning: exported var ImplementedServices should have comment or be unexported (golint)
    • ape/helpers/slack.go
    • Line 27: warning: exported type PostSlackMessageInput should have comment or be unexported (golint)
    • Line 35: warning: exported function PostSlackMessage should have comment or be unexported (golint)
    • ape/loader.go
    • Line 41: warning: exported function ParsePoliciesFileContent should have comment or be unexported (golint)
    • Line 84: warning: exported function ParsePlaybookFileContent should have comment or be unexported (golint)
    • Line 173: warning: exported function LoadConfigs should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!