Preparing report...

Report for github.com/Shopify/voucher

A+    Excellent!    Found 21 issues across 209 files

Tweet

gofmt99%

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!


gocyclo100%

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.

No problems detected. Good job!


golint90%

Golint is a linter for Go source code.

    • voucher/metrics/noop_client.go
    • Line 7: warning: exported type NoopClient should have comment or be unexported (golint)
    • Line 9: warning: exported method NoopClient.CheckRunStart should have comment or be unexported (golint)
    • Line 10: warning: exported method NoopClient.CheckRunLatency should have comment or be unexported (golint)
    • Line 11: warning: exported method NoopClient.CheckAttestationLatency should have comment or be unexported (golint)
    • Line 12: warning: exported method NoopClient.CheckRunFailure should have comment or be unexported (golint)
    • Line 13: warning: exported method NoopClient.CheckRunError should have comment or be unexported (golint)
    • Line 14: warning: exported method NoopClient.CheckRunSuccess should have comment or be unexported (golint)
    • Line 15: warning: exported method NoopClient.CheckAttestationStart should have comment or be unexported (golint)
    • Line 16: warning: exported method NoopClient.CheckAttestationError should have comment or be unexported (golint)
    • Line 17: warning: exported method NoopClient.CheckAttestationSuccess should have comment or be unexported (golint)
    • voucher/repository/objects.go
    • Line 10: warning: exported const Protocol should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported function NewOrganization should have comment or be unexported (golint)
    • Line 52: warning: exported const CommitStatusError should have comment (or a comment on this block) or be unexported (golint)
    • Line 153: warning: exported function NewRepositoryMetadata should have comment or be unexported (golint)
    • voucher/mock_metadataclient.go
    • Line 12: warning: exported type MockMetadataClient should have comment or be unexported (golint)
    • Line 16: warning: exported method MockMetadataClient.CanAttest should have comment or be unexported (golint)
    • Line 21: warning: exported method MockMetadataClient.NewPayloadBody should have comment or be unexported (golint)
    • Line 26: warning: exported method MockMetadataClient.GetVulnerabilities should have comment or be unexported (golint)
    • Line 31: warning: exported method MockMetadataClient.GetBuildDetail should have comment or be unexported (golint)
    • Line 36: warning: exported method MockMetadataClient.AddAttestationToImage should have comment or be unexported (golint)
    • Line 41: warning: exported method MockMetadataClient.GetAttestations should have comment or be unexported (golint)
    • Line 46: warning: exported method MockMetadataClient.Close should have comment or be unexported (golint)
    • voucher/metrics/dogstatsd.go
    • Line 9: warning: exported type DogStatsdClient should have comment or be unexported (golint)
    • Line 14: warning: exported function NewDogStatsdClient should have comment or be unexported (golint)
    • Line 26: warning: exported method DogStatsdClient.CheckRunStart should have comment or be unexported (golint)
    • Line 30: warning: exported method DogStatsdClient.CheckRunLatency should have comment or be unexported (golint)
    • Line 34: warning: exported method DogStatsdClient.CheckAttestationLatency should have comment or be unexported (golint)
    • Line 38: warning: exported method DogStatsdClient.CheckRunError should have comment or be unexported (golint)
    • Line 43: warning: exported method DogStatsdClient.CheckRunFailure should have comment or be unexported (golint)
    • Line 47: warning: exported method DogStatsdClient.CheckRunSuccess should have comment or be unexported (golint)
    • Line 51: warning: exported method DogStatsdClient.CheckAttestationStart should have comment or be unexported (golint)
    • Line 55: warning: exported method DogStatsdClient.CheckAttestationSuccess should have comment or be unexported (golint)
    • Line 59: warning: exported method DogStatsdClient.CheckAttestationError should have comment or be unexported (golint)
    • voucher/repository/mock_client.go
    • Line 9: warning: exported type MockClient should have comment or be unexported (golint)
    • Line 13: warning: exported method MockClient.GetCommit should have comment or be unexported (golint)
    • Line 18: warning: exported method MockClient.GetOrganization should have comment or be unexported (golint)
    • Line 23: warning: exported method MockClient.GetBranch should have comment or be unexported (golint)
    • Line 28: warning: exported method MockClient.GetDefaultBranch should have comment or be unexported (golint)
    • voucher/signer/kms/signer.go
    • Line 14: warning: exported const AlgoSHA512 should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type Key should have comment or be unexported (golint)
    • Line 30: warning: exported function NewSigner should have comment or be unexported (golint)
    • Line 42: warning: exported method Signer.Sign should have comment or be unexported (golint)
    • voucher/mock_check.go
    • Line 9: warning: exported type MockCheck should have comment or be unexported (golint)
    • Line 13: warning: exported method MockCheck.Check should have comment or be unexported (golint)
    • voucher/checks/approved/check.go
    • Line 19: warning: exported var ErrNotSigned should have comment or be unexported (golint)
    • Line 20: warning: exported var ErrNotOnDefaultBranch should have comment or be unexported (golint)
    • Line 21: warning: exported var ErrNotMergeCommit should have comment or be unexported (golint)
    • Line 22: warning: exported var ErrMissingRequiredApprovals should have comment or be unexported (golint)
    • Line 23: warning: exported var ErrNotPassedCI should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!