Preparing report...

Report for github.com/buildtool/build-tools

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


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!


golint57%

Golint is a linter for Go source code.

    • build-tools/pkg/ci/buildkite.go
    • Line 3: warning: exported type Buildkite should have comment or be unexported (golint)
    • Line 12: warning: exported method Buildkite.Name should have comment or be unexported (golint)
    • Line 16: warning: exported method Buildkite.BranchReplaceSlash should have comment or be unexported (golint)
    • Line 20: warning: exported method Buildkite.BuildName should have comment or be unexported (golint)
    • Line 24: warning: exported method Buildkite.Branch should have comment or be unexported (golint)
    • Line 28: warning: exported method Buildkite.Commit should have comment or be unexported (golint)
    • Line 32: warning: exported method Buildkite.Configured should have comment or be unexported (golint)
    • build-tools/pkg/deploy/deploy.go
    • Line 23: warning: exported type Args should have comment or be unexported (golint)
    • Line 32: warning: exported function DoDeploy should have comment or be unexported (golint)
    • Line 38: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 46: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 85: warning: exported function Deploy should have comment or be unexported (golint)
    • Line 108: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 120: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 135: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • build-tools/pkg/registry/gcr.go
    • Line 15: warning: exported type GCR should have comment or be unexported (golint)
    • Line 23: warning: exported method GCR.Name should have comment or be unexported (golint)
    • Line 27: warning: exported method GCR.Configured should have comment or be unexported (golint)
    • Line 34: warning: exported method GCR.Login should have comment or be unexported (golint)
    • Line 40: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 45: warning: exported method GCR.GetAuthConfig should have comment or be unexported (golint)
    • Line 53: warning: exported method GCR.GetAuthInfo should have comment or be unexported (golint)
    • Line 58: warning: exported method GCR.RegistryUrl should have comment or be unexported (golint)
    • Line 62: warning: exported method GCR.Create should have comment or be unexported (golint)
    • build-tools/pkg/registry/quay.go
    • Line 15: warning: exported type Quay should have comment or be unexported (golint)
    • Line 24: warning: exported method Quay.Name should have comment or be unexported (golint)
    • Line 28: warning: exported method Quay.Configured should have comment or be unexported (golint)
    • Line 32: warning: exported method Quay.Login should have comment or be unexported (golint)
    • Line 36: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 41: warning: exported method Quay.GetAuthConfig should have comment or be unexported (golint)
    • Line 45: warning: exported method Quay.GetAuthInfo should have comment or be unexported (golint)
    • Line 50: warning: exported method Quay.RegistryUrl should have comment or be unexported (golint)
    • Line 54: warning: exported method Quay.Create should have comment or be unexported (golint)
    • build-tools/pkg/ci/ci.go
    • Line 11: warning: exported type CI should have comment or be unexported (golint)
    • Line 22: warning: exported type Common should have comment or be unexported (golint)
    • Line 26: warning: exported method Common.SetVCS should have comment or be unexported (golint)
    • Line 30: warning: exported method Common.BuildName should have comment or be unexported (golint)
    • Line 38: warning: exported method Common.Branch should have comment or be unexported (golint)
    • Line 45: warning: exported method Common.Commit should have comment or be unexported (golint)
    • Line 56: warning: exported function IsValid should have comment or be unexported (golint)
    • build-tools/pkg/registry/ecr.go
    • Line 23: warning: exported type ECR should have comment or be unexported (golint)
    • Line 36: warning: exported method ECR.Name should have comment or be unexported (golint)
    • Line 40: warning: exported method ECR.Configured should have comment or be unexported (golint)
    • Line 76: warning: exported method ECR.Login should have comment or be unexported (golint)
    • Line 95: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 100: warning: exported method ECR.GetAuthConfig should have comment or be unexported (golint)
    • Line 104: warning: exported method ECR.GetAuthInfo should have comment or be unexported (golint)
    • Line 109: warning: exported method ECR.RegistryUrl should have comment or be unexported (golint)
    • Line 113: warning: exported method ECR.Create should have comment or be unexported (golint)
    • Line 137: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • build-tools/pkg/config/config.go
    • Line 24: warning: exported type Config should have comment or be unexported (golint)
    • Line 33: warning: exported type VCSConfig should have comment or be unexported (golint)
    • Line 37: warning: exported type CIConfig should have comment or be unexported (golint)
    • Line 45: warning: exported type RegistryConfig should have comment or be unexported (golint)
    • Line 54: warning: exported type Target should have comment or be unexported (golint)
    • Line 62: warning: exported function Load should have comment or be unexported (golint)
    • Line 96: warning: exported function InitEmptyConfig should have comment or be unexported (golint)
    • Line 120: warning: exported method Config.CurrentVCS should have comment or be unexported (golint)
    • Line 124: warning: exported method Config.CurrentCI should have comment or be unexported (golint)
    • Line 136: warning: exported method Config.CurrentRegistry should have comment or be unexported (golint)
    • Line 145: warning: exported method Config.Print should have comment or be unexported (golint)
    • Line 159: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 165: warning: exported method Config.CurrentTarget should have comment or be unexported (golint)
    • Line 214: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 222: warning: exported function UnmarshalStrict should have comment or be unexported (golint)
    • build-tools/pkg/ci/github.go
    • Line 7: warning: exported type Github should have comment or be unexported (golint)
    • Line 16: warning: exported method Github.Name should have comment or be unexported (golint)
    • Line 20: warning: exported method Github.BranchReplaceSlash should have comment or be unexported (golint)
    • Line 24: warning: exported method Github.BuildName should have comment or be unexported (golint)
    • Line 28: warning: exported method Github.Branch should have comment or be unexported (golint)
    • Line 38: warning: exported method Github.Commit should have comment or be unexported (golint)
    • Line 42: warning: exported method Github.Configured should have comment or be unexported (golint)
    • build-tools/pkg/docker/docker.go
    • Line 21: warning: exported type Client should have comment or be unexported (golint)
    • Line 29: warning: exported function Tag should have comment or be unexported (golint)
    • Line 37: warning: exported function SlugifyTag should have comment or be unexported (golint)
    • Line 48: warning: exported function ParseDockerignore should have comment or be unexported (golint)
    • Line 57: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 70: warning: exported function FindStages should have comment or be unexported (golint)
    • build-tools/pkg/docker/testing.go
    • Line 16: warning: exported type MockDocker should have comment or be unexported (golint)
    • Line 32: warning: exported method MockDocker.ImageBuild should have comment or be unexported (golint)
    • Line 49: warning: exported method MockDocker.ImagePush should have comment or be unexported (golint)
    • Line 59: warning: exported method MockDocker.RegistryLogin should have comment or be unexported (golint)
    • build-tools/pkg/registry/dockerhub.go
    • Line 15: warning: exported type Dockerhub should have comment or be unexported (golint)
    • Line 24: warning: exported method Dockerhub.Name should have comment or be unexported (golint)
    • Line 28: warning: exported method Dockerhub.Configured should have comment or be unexported (golint)
    • Line 32: warning: exported method Dockerhub.Login should have comment or be unexported (golint)
    • Line 36: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 42: warning: exported method Dockerhub.GetAuthConfig should have comment or be unexported (golint)
    • Line 46: warning: exported method Dockerhub.GetAuthInfo should have comment or be unexported (golint)
    • Line 51: warning: exported method Dockerhub.RegistryUrl should have comment or be unexported (golint)
    • Line 55: warning: exported method Dockerhub.Create should have comment or be unexported (golint)
    • build-tools/pkg/registry/github.go
    • Line 15: warning: exported type Github should have comment or be unexported (golint)
    • Line 25: warning: exported method Github.Name should have comment or be unexported (golint)
    • Line 29: warning: exported method Github.Configured should have comment or be unexported (golint)
    • Line 33: warning: exported method Github.Login should have comment or be unexported (golint)
    • Line 37: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 48: warning: exported method Github.GetAuthConfig should have comment or be unexported (golint)
    • Line 52: warning: exported method Github.GetAuthInfo should have comment or be unexported (golint)
    • Line 57: warning: exported method Github.RegistryUrl should have comment or be unexported (golint)
    • Line 61: warning: exported method Github.Create should have comment or be unexported (golint)
    • build-tools/pkg/registry/no.go
    • Line 13: warning: exported type NoDockerRegistry should have comment or be unexported (golint)
    • Line 15: warning: exported method NoDockerRegistry.Configured should have comment or be unexported (golint)
    • Line 19: warning: exported method NoDockerRegistry.Name should have comment or be unexported (golint)
    • Line 23: warning: exported method NoDockerRegistry.Login should have comment or be unexported (golint)
    • Line 28: warning: exported method NoDockerRegistry.GetAuthConfig should have comment or be unexported (golint)
    • Line 32: warning: exported method NoDockerRegistry.GetAuthInfo should have comment or be unexported (golint)
    • Line 36: warning: exported method NoDockerRegistry.RegistryUrl should have comment or be unexported (golint)
    • Line 40: warning: exported method NoDockerRegistry.Create should have comment or be unexported (golint)
    • Line 44: warning: exported method NoDockerRegistry.PushImage should have comment or be unexported (golint)
    • build-tools/pkg/registry/registry.go
    • Line 16: warning: exported type Registry should have comment or be unexported (golint)
    • Line 51: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 59: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • build-tools/pkg/ci/gitlab.go
    • Line 3: warning: exported type Gitlab should have comment or be unexported (golint)
    • Line 12: warning: exported method Gitlab.Name should have comment or be unexported (golint)
    • Line 16: warning: exported method Gitlab.BranchReplaceSlash should have comment or be unexported (golint)
    • Line 20: warning: exported method Gitlab.BuildName should have comment or be unexported (golint)
    • Line 24: warning: exported method Gitlab.Branch should have comment or be unexported (golint)
    • Line 28: warning: exported method Gitlab.Commit should have comment or be unexported (golint)
    • Line 32: warning: exported method Gitlab.Configured should have comment or be unexported (golint)
    • build-tools/pkg/kubectl/kubectl.go
    • Line 16: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 24: warning: exported type Kubectl should have comment or be unexported (golint)
    • Line 42: warning: exported function New should have comment or be unexported (golint)
    • Line 190: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 203: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • build-tools/pkg/kubectl/testing.go
    • Line 5: warning: exported type MockKubectl should have comment or be unexported (golint)
    • Line 12: warning: exported method MockKubectl.Apply should have comment or be unexported (golint)
    • Line 17: warning: exported method MockKubectl.Cleanup should have comment or be unexported (golint)
    • Line 20: warning: exported method MockKubectl.DeploymentExists should have comment or be unexported (golint)
    • Line 24: warning: exported method MockKubectl.RolloutStatus should have comment or be unexported (golint)
    • Line 28: warning: exported method MockKubectl.DeploymentEvents should have comment or be unexported (golint)
    • Line 32: warning: exported method MockKubectl.PodEvents should have comment or be unexported (golint)
    • build-tools/pkg/args/args.go
    • Line 14: warning: exported type Globals should have comment or be unexported (golint)
    • Line 20: warning: exported type VersionFlag should have comment or be unexported (golint)
    • Line 25: warning: error var Done should have name of the form ErrFoo (golint)
    • Line 25: warning: exported var Done should have comment or be unexported (golint)
    • Line 27: warning: exported method VersionFlag.Decode should have comment or be unexported (golint)
    • Line 28: warning: exported method VersionFlag.IsBool should have comment or be unexported (golint)
    • Line 29: warning: exported method VersionFlag.BeforeApply should have comment or be unexported (golint)
    • Line 35: warning: exported type ConfigFlag should have comment or be unexported (golint)
    • Line 37: warning: exported method ConfigFlag.Decode should have comment or be unexported (golint)
    • Line 38: warning: exported method ConfigFlag.IsBool should have comment or be unexported (golint)
    • Line 39: warning: exported method ConfigFlag.BeforeApply should have comment or be unexported (golint)
    • Line 50: warning: exported function ParseArgs should have comment or be unexported (golint)
    • build-tools/pkg/ci/azure.go
    • Line 3: warning: exported type Azure should have comment or be unexported (golint)
    • Line 12: warning: exported method Azure.Name should have comment or be unexported (golint)
    • Line 16: warning: exported method Azure.BranchReplaceSlash should have comment or be unexported (golint)
    • Line 20: warning: exported method Azure.BuildName should have comment or be unexported (golint)
    • Line 24: warning: exported method Azure.Branch should have comment or be unexported (golint)
    • Line 28: warning: exported method Azure.Commit should have comment or be unexported (golint)
    • Line 32: warning: exported method Azure.Configured should have comment or be unexported (golint)
    • build-tools/pkg/ci/teamcity.go
    • Line 3: warning: exported type TeamCity should have comment or be unexported (golint)
    • Line 12: warning: exported method TeamCity.Name should have comment or be unexported (golint)
    • Line 16: warning: exported method TeamCity.BranchReplaceSlash should have comment or be unexported (golint)
    • Line 20: warning: exported method TeamCity.BuildName should have comment or be unexported (golint)
    • Line 24: warning: exported method TeamCity.Branch should have comment or be unexported (golint)
    • Line 28: warning: exported method TeamCity.Commit should have comment or be unexported (golint)
    • Line 32: warning: exported method TeamCity.Configured should have comment or be unexported (golint)
    • build-tools/pkg/ci/no.go
    • Line 3: warning: exported type No should have comment or be unexported (golint)
    • Line 9: warning: exported method No.Name should have comment or be unexported (golint)
    • Line 13: warning: exported method No.BranchReplaceSlash should have comment or be unexported (golint)
    • Line 17: warning: exported method No.BuildName should have comment or be unexported (golint)
    • Line 21: warning: exported method No.Branch should have comment or be unexported (golint)
    • Line 25: warning: exported method No.Commit should have comment or be unexported (golint)
    • Line 29: warning: exported method No.Configured should have comment or be unexported (golint)
    • build-tools/pkg/registry/gitlab.go
    • Line 16: warning: exported type Gitlab should have comment or be unexported (golint)
    • Line 25: warning: exported method Gitlab.Name should have comment or be unexported (golint)
    • Line 29: warning: exported method Gitlab.Configured should have comment or be unexported (golint)
    • Line 33: warning: exported method Gitlab.Login should have comment or be unexported (golint)
    • Line 37: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 42: warning: exported method Gitlab.GetAuthConfig should have comment or be unexported (golint)
    • Line 46: warning: exported method Gitlab.GetAuthInfo should have comment or be unexported (golint)
    • Line 51: warning: exported method Gitlab.RegistryUrl should have comment or be unexported (golint)
    • Line 62: warning: exported method Gitlab.Create should have comment or be unexported (golint)
    • build-tools/pkg/tar/tar.go
    • Line 10: warning: exported function ExtractFileContent should have comment or be unexported (golint)
    • Line 19: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • build-tools/pkg/push/push.go
    • Line 20: warning: exported type Args should have comment or be unexported (golint)
    • Line 25: warning: exported function Push should have comment or be unexported (golint)
    • Line 36: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • build-tools/pkg/build/build.go
    • Line 35: warning: exported type Args should have comment or be unexported (golint)
    • Line 43: warning: exported function DoBuild should have comment or be unexported (golint)
    • Line 54: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 62: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 66: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 79: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 187: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 194: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 197: warning: if block ends with a return statement, so drop this else and outdent its block (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!