Preparing report...

Report for github.com/argoproj-labs/argocd-image-updater

A+    Excellent!    Found 30 issues across 52 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!


gocyclo88%

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.


golint42%

Golint is a linter for Go source code.

    • argocd-image-updater/pkg/registry/endpoints.go
    • Line 20: warning: exported const SortUnsorted should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported const RateLimitNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 125: warning: exported function AddRegistryEndpointFromConfig should have comment or be unexported (golint)
    • Line 158: 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)
    • argocd-image-updater/pkg/common/constants.go
    • Line 5: warning: exported const ImageUpdaterAnnotationPrefix should have comment or be unexported (golint)
    • Line 7: warning: comment on exported const ImageUpdaterAnnotation should be of the form "ImageUpdaterAnnotation ..." (golint)
    • Line 51: warning: comment on exported const DefaultGitCommitMessage should be of the form "DefaultGitCommitMessage ..." (golint)
    • argocd-image-updater/pkg/image/kustomize.go
    • Line 9: warning: exported type KustomizeImage should have comment or be unexported (golint)
    • Line 20: warning: comment on exported method KustomizeImage.Match should be of the form "Match ..." (golint)
    • Line 29: warning: exported type KustomizeImages should have comment or be unexported (golint)
    • Line 31: warning: comment on exported method KustomizeImages.Find should be of the form "Find ..." (golint)
    • argocd-image-updater/pkg/argocd/argocd.go
    • Line 60: warning: comment on exported function NewK8SClient should be of the form "NewK8SClient ..." (golint)
    • Line 78: warning: comment on exported type ApplicationType should be of the form "ApplicationType ..." (with optional leading article) (golint)
    • Line 82: warning: exported const ApplicationTypeUnsupported should have comment (or a comment on this block) or be unexported (golint)
    • Line 87: warning: comment on exported type ClientOptions should be of the form "ClientOptions ..." (with optional leading article) (golint)
    • Line 123: warning: exported type ApplicationImages should have comment or be unexported (golint)
    • Line 128: warning: comment on exported type ImageList should be of the form "ImageList ..." (with optional leading article) (golint)
    • Line 148: warning: comment on exported function FilterApplicationsForUpdate should be of the form "FilterApplicationsForUpdate ..." (golint)
    • argocd-image-updater/ext/git/client.go
    • Line 34: warning: exported type RevisionMetadata should have comment or be unexported (golint)
    • Line 41: warning: comment on exported type Refs should be of the form "Refs ..." (with optional leading article) (golint)
    • Line 110: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 118: warning: exported function NewClientExt should have comment or be unexported (golint)
    • Line 129: warning: comment on exported function GetRepoHTTPClient should be of the form "GetRepoHTTPClient ..." (golint)
    • argocd-image-updater/cmd/main.go
    • Line 194: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 202: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • argocd-image-updater/pkg/argocd/update.go
    • Line 25: warning: comment on exported type ImageUpdaterResult should be of the form "ImageUpdaterResult ..." (with optional leading article) (golint)
    • Line 35: warning: exported type UpdateConfiguration should have comment or be unexported (golint)
    • Line 47: warning: exported type GitCredsSource should have comment or be unexported (golint)
    • Line 49: warning: exported type WriteBackMethod should have comment or be unexported (golint)
    • Line 52: warning: exported const WriteBackApplication should have comment (or a comment on this block) or be unexported (golint)
    • argocd-image-updater/pkg/argocd/git.go
    • Line 24: warning: comment on exported function TemplateCommitMessage should be of the form "TemplateCommitMessage ..." (golint)
    • Line 163: warning: error should be the last type when returning multiple items (golint)
    • Line 170: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 208: warning: error should be the last type when returning multiple items (golint)
    • Line 211: 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)
    • argocd-image-updater/ext/git/creds.go
    • Line 16: warning: exported type Creds should have comment or be unexported (golint)
    • Line 20: warning: comment on exported type NopCloser should be of the form "NopCloser ..." (with optional leading article) (golint)
    • Line 24: warning: exported method NopCloser.Close should have comment or be unexported (golint)
    • Line 28: warning: exported type NopCreds should have comment or be unexported (golint)
    • Line 31: warning: exported method NopCreds.Environ should have comment or be unexported (golint)
    • Line 35: warning: comment on exported type HTTPSCreds should be of the form "HTTPSCreds ..." (with optional leading article) (golint)
    • Line 49: warning: exported function NewHTTPSCreds should have comment or be unexported (golint)
    • Line 59: warning: comment on exported method HTTPSCreds.Environ should be of the form "Environ ..." (golint)
    • Line 119: warning: comment on exported type SSHCreds should be of the form "SSHCreds ..." (with optional leading article) (golint)
    • Line 126: warning: exported function NewSSHCreds should have comment or be unexported (golint)
    • Line 152: warning: exported method SSHCreds.Environ should have comment or be unexported (golint)
    • argocd-image-updater/pkg/cache/memcache.go
    • Line 11: warning: exported type MemCache should have comment or be unexported (golint)
    • Line 28: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 52: warning: exported method MemCache.SetImage should have comment or be unexported (golint)
    • argocd-image-updater/pkg/image/options.go
    • Line 64: warning: comment on exported method ContainerImage.GetParameterUpdateStrategy should be of the form "GetParameterUpdateStrategy ..." (golint)
    • Line 78: warning: exported function ParseUpdateStrategy should have comment or be unexported (golint)
    • Line 110: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • argocd-image-updater/pkg/registry/client.go
    • Line 34: warning: exported type NewRegistryClient should have comment or be unexported (golint)
    • Line 164: 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)
    • argocd-image-updater/pkg/version/version.go
    • Line 16: warning: exported function Version should have comment or be unexported (golint)
    • Line 21: warning: exported function BinaryName should have comment or be unexported (golint)
    • Line 25: warning: exported function Useragent should have comment or be unexported (golint)
    • Line 29: warning: exported function GitCommit should have comment or be unexported (golint)
    • Line 33: warning: exported function BuildDate should have comment or be unexported (golint)
    • Line 37: warning: exported function GoVersion should have comment or be unexported (golint)
    • Line 41: warning: exported function GoPlatform should have comment or be unexported (golint)
    • Line 45: warning: exported function GoCompiler should have comment or be unexported (golint)
    • argocd-image-updater/pkg/registry/config.go
    • Line 63: warning: comment on exported function ParseRegistryConfiguration should be of the form "ParseRegistryConfiguration ..." (golint)
    • Line 103: warning: comment on exported function RestoreDefaultRegistryConfiguration should be of the form "RestoreDefaultRegistryConfiguration ..." (golint)
    • argocd-image-updater/pkg/kube/kubernetes.go
    • Line 21: warning: exported type KubernetesClient should have comment or be unexported (golint)
    • Line 28: warning: exported function NewKubernetesClient should have comment or be unexported (golint)
    • Line 37: warning: comment on exported function NewKubernetesClientFromConfig should be of the form "NewKubernetesClientFromConfig ..." (golint)
    • Line 93: 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 98: warning: comment on exported method KubernetesClient.CreateApplicationEvent should be of the form "CreateApplicationEvent ..." (golint)
    • argocd-image-updater/pkg/tag/tag.go
    • Line 76: warning: receiver name sil should be consistent with previous receiver name il for SortableImageTagList (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 104: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 109: warning: comment on exported method ImageTagList.Contains should be of the form "Contains ..." (golint)
    • Line 152: warning: exported method ImageTagList.SortBySemVer should have comment or be unexported (golint)
    • argocd-image-updater/pkg/image/image.go
    • Line 10: warning: exported type ContainerImage should have comment or be unexported (golint)
    • Line 21: warning: exported type ContainerImageList should have comment or be unexported (golint)
    • Line 43: warning: exported method ContainerImage.GetFullNameWithoutTag should have comment or be unexported (golint)
    • Line 72: warning: exported method ContainerImage.Original should have comment or be unexported (golint)
    • Line 95: warning: exported method ContainerImage.DiffersFrom should have comment or be unexported (golint)
    • Line 117: warning: exported method ContainerImageList.Originals should have comment or be unexported (golint)
    • Line 146: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 175: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 179: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 190: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • argocd-image-updater/pkg/registry/registry.go
    • Line 25: warning: exported const MaxMetadataConcurrency should have comment (or a comment on this block) or be unexported (golint)
    • Line 173: warning: receiver name ep should be consistent with previous receiver name endpoint for RegistryEndpoint (golint)
    • Line 182: warning: comment on exported method RegistryEndpoint.SetEndpointCredentials should be of the form "SetEndpointCredentials ..." (golint)
    • Line 183: warning: receiver name ep should be consistent with previous receiver name endpoint for RegistryEndpoint (golint)
    • argocd-image-updater/pkg/image/version.go
    • Line 30: warning: comment on exported const ConstraintMatchSemver should be of the form "ConstraintMatchSemver ..." (golint)
    • Line 47: warning: exported type MatchFuncFn should have comment or be unexported (golint)
    • Line 141: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • argocd-image-updater/pkg/image/credentials.go
    • Line 18: warning: exported type CredentialSourceType should have comment or be unexported (golint)
    • Line 21: warning: exported const CredentialSourceUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type CredentialSource should have comment or be unexported (golint)
    • Line 38: warning: exported type Credential should have comment or be unexported (golint)
    • Line 49: warning: exported function ParseCredentialSource 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!


misspell94%

Misspell Finds commonly misspelled English words