Preparing report...

Report for github.com/openshift/image-registry

A+    Excellent!    Found 73 issues across 184 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!


gocyclo84%

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.


golint69%

Golint is a linter for Go source code.

    • image-registry/pkg/dockerregistry/server/cache/cacheprovider.go
    • Line 12: warning: exported type Provider should have comment or be unexported (golint)
    • Line 18: warning: exported method Provider.RepositoryScoped should have comment or be unexported (golint)
    • Line 28: warning: exported method Provider.Stat should have comment or be unexported (golint)
    • Line 32: warning: exported method Provider.SetDescriptor should have comment or be unexported (golint)
    • Line 38: warning: exported method Provider.Clear should have comment or be unexported (golint)
    • image-registry/pkg/imagestream/imagestream.go
    • Line 27: warning: exported const ErrImageStreamCode should have comment (or a comment on this block) or be unexported (golint)
    • Line 48: warning: exported type ImageStream should have comment or be unexported (golint)
    • Line 79: warning: exported function New should have comment or be unexported (golint)
    • image-registry/pkg/testframework/client.go
    • Line 20: warning: exported function GenerateRandomBytes should have comment or be unexported (golint)
    • Line 29: warning: exported function GenerateOAuthTokenPair should have comment or be unexported (golint)
    • Line 36: warning: exported function GetClientForUser should have comment or be unexported (golint)
    • image-registry/pkg/testframework/registry.go
    • Line 37: warning: exported type CloseFunc should have comment or be unexported (golint)
    • Line 39: warning: exported type RegistryOption should have comment or be unexported (golint)
    • Line 43: warning: exported type DisableMirroring should have comment or be unexported (golint)
    • Line 45: warning: exported method DisableMirroring.Apply should have comment or be unexported (golint)
    • Line 49: warning: exported type EnableMetrics should have comment or be unexported (golint)
    • Line 53: warning: exported method EnableMetrics.Apply should have comment or be unexported (golint)
    • Line 58: warning: exported function StartTestRegistry should have comment or be unexported (golint)
    • Line 140: warning: exported type Registry should have comment or be unexported (golint)
    • Line 146: warning: exported method Registry.Close should have comment or be unexported (golint)
    • Line 152: warning: exported method Registry.Addr should have comment or be unexported (golint)
    • Line 156: warning: exported method Registry.BaseURL should have comment or be unexported (golint)
    • Line 160: warning: exported method Registry.Repository should have comment or be unexported (golint)
    • Line 184: warning: exported type AuthConfig should have comment or be unexported (golint)
    • Line 189: warning: exported type DockerConfig should have comment or be unexported (golint)
    • Line 193: warning: exported function MakeDockerConfigSecret should have comment or be unexported (golint)
    • Line 210: warning: exported type CleanupFunc should have comment or be unexported (golint)
    • Line 212: warning: exported function CreateEphemeralRegistry should have comment or be unexported (golint)
    • image-registry/pkg/dockerregistry/server/storage/storage.go
    • Line 12: warning: exported type Enumerator should have comment or be unexported (golint)
    • Line 16: warning: exported method Enumerator.Repositories should have comment or be unexported (golint)
    • Line 24: warning: exported method Enumerator.Blobs should have comment or be unexported (golint)
    • Line 28: warning: exported method Enumerator.Manifests should have comment or be unexported (golint)
    • image-registry/pkg/testutil/util.go
    • Line 32: warning: exported function NewTransport should have comment or be unexported (golint)
    • Line 81: warning: exported function NewInsecureRepository should have comment or be unexported (golint)
    • Line 270: warning: exported const SampleImageManifestSchema1 should have comment or be unexported (golint)
    • Line 425: warning: exported function ConvertImage should have comment or be unexported (golint)
    • Line 448: warning: exported function VerifyRemoteImage should have comment or be unexported (golint)
    • image-registry/pkg/kubernetes-common/credentialprovider/keyring.go
    • Line 65: warning: exported function DockerConfigEntryToLazyAuthConfiguration should have comment or be unexported (golint)
    • Line 75: warning: exported method BasicDockerKeyring.Add should have comment or be unexported (golint)
    • Line 278: warning: exported type FakeKeyring should have comment or be unexported (golint)
    • Line 283: warning: exported method FakeKeyring.Lookup should have comment or be unexported (golint)
    • image-registry/pkg/testutil/manifests.go
    • Line 29: warning: exported type ManifestSchemaVersion should have comment or be unexported (golint)
    • Line 31: warning: exported type ConfigPayload should have comment or be unexported (golint)
    • Line 34: warning: exported const ManifestSchema1 should have comment (or a comment on this block) or be unexported (golint)
    • Line 126: warning: exported function MakeRandomLayer should have comment or be unexported (golint)
    • Line 139: warning: exported function MakeManifestConfig should have comment or be unexported (golint)
    • image-registry/pkg/imagestream/image.go
    • Line 22: warning: exported const ErrImageGetterCode should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported function IsImageManaged should have comment or be unexported (golint)
    • image-registry/pkg/testframework/httptest.go
    • Line 11: warning: exported type HTTPServer should have comment or be unexported (golint)
    • Line 19: warning: exported function NewHTTPServer should have comment or be unexported (golint)
    • Line 59: warning: exported method HTTPServer.Close should have comment or be unexported (golint)
    • image-registry/pkg/dockerregistry/server/configuration/configuration.go
    • Line 110: warning: exported var ErrUnsupportedVersion should have comment or be unexported (golint)
    • Line 117: warning: exported type Configuration should have comment or be unexported (golint)
    • Line 131: warning: exported type Metrics should have comment or be unexported (golint)
    • Line 136: warning: exported type Requests should have comment or be unexported (golint)
    • Line 141: warning: exported type RequestsLimits should have comment or be unexported (golint)
    • Line 147: warning: exported type Server should have comment or be unexported (golint)
    • Line 151: warning: exported type Auth should have comment or be unexported (golint)
    • Line 156: warning: exported type Audit should have comment or be unexported (golint)
    • Line 160: warning: exported type Cache should have comment or be unexported (golint)
    • Line 165: warning: exported type Quota should have comment or be unexported (golint)
    • Line 170: warning: exported type Pullthrough should have comment or be unexported (golint)
    • Line 175: warning: exported type Compatibility should have comment or be unexported (golint)
    • Line 542: warning: exported function InitExtraConfig should have comment or be unexported (golint)
    • image-registry/pkg/dockerregistry/server/prune/prune.go
    • Line 39: warning: exported method DryRunPruner.DeleteRepository should have comment or be unexported (golint)
    • Line 45: warning: exported method DryRunPruner.DeleteManifestLink should have comment or be unexported (golint)
    • Line 51: warning: exported method DryRunPruner.DeleteBlob should have comment or be unexported (golint)
    • image-registry/pkg/dockerregistry/server/app.go
    • Line 74: warning: exported method App.Storage should have comment or be unexported (golint)
    • Line 79: warning: exported method App.Registry should have comment or be unexported (golint)
    • Line 87: warning: exported method App.BlobStatter should have comment or be unexported (golint)
    • Line 94: warning: exported method App.CacheProvider should have comment or be unexported (golint)
    • image-registry/pkg/kubernetes-common/credentialprovider/config.go
    • Line 46: warning: exported type DockerConfigEntry should have comment or be unexported (golint)
    • Line 66: warning: exported function SetPreferredDockercfgPath should have comment or be unexported (golint)
    • Line 72: warning: exported function GetPreferredDockercfgPath should have comment or be unexported (golint)
    • Line 156: warning: exported function ReadDockerConfigFile should have comment or be unexported (golint)
    • Line 176: warning: exported function ReadUrl should have comment or be unexported (golint)
    • Line 206: warning: exported function ReadDockerConfigFileFromUrl should have comment or be unexported (golint)
    • Line 209: 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 245: warning: exported method DockerConfigEntry.UnmarshalJSON should have comment or be unexported (golint)
    • Line 264: warning: exported method DockerConfigEntry.MarshalJSON should have comment or be unexported (golint)
    • image-registry/pkg/dockerregistry/server/client/interfaces.go
    • Line 20: warning: exported type UsersInterfacer should have comment or be unexported (golint)
    • Line 24: warning: exported type ImagesInterfacer should have comment or be unexported (golint)
    • Line 28: warning: exported type ImageSignaturesInterfacer should have comment or be unexported (golint)
    • Line 32: warning: exported type ImageStreamImagesNamespacer should have comment or be unexported (golint)
    • Line 36: warning: exported type ImageStreamsNamespacer should have comment or be unexported (golint)
    • Line 40: warning: exported type ImageStreamMappingsNamespacer should have comment or be unexported (golint)
    • Line 44: warning: exported type ImageStreamSecretsNamespacer should have comment or be unexported (golint)
    • Line 48: warning: exported type ImageStreamTagsNamespacer should have comment or be unexported (golint)
    • Line 52: warning: exported type LimitRangesGetter should have comment or be unexported (golint)
    • Line 56: warning: exported type LocalSubjectAccessReviewsNamespacer should have comment or be unexported (golint)
    • Line 60: warning: exported type SelfSubjectAccessReviewsNamespacer should have comment or be unexported (golint)
    • Line 66: warning: exported type ImageSignatureInterface should have comment or be unexported (golint)
    • Line 72: warning: exported type ImageStreamImageInterface should have comment or be unexported (golint)
    • Line 78: warning: exported type UserInterface should have comment or be unexported (golint)
    • Line 84: warning: exported type ImageInterface should have comment or be unexported (golint)
    • Line 92: warning: exported type ImageStreamInterface should have comment or be unexported (golint)
    • Line 101: warning: exported type ImageStreamMappingInterface should have comment or be unexported (golint)
    • Line 107: warning: exported type ImageStreamTagInterface should have comment or be unexported (golint)
    • Line 113: warning: exported type ImageStreamSecretInterface should have comment or be unexported (golint)
    • Line 119: warning: exported type LimitRangeInterface should have comment or be unexported (golint)
    • Line 125: warning: exported type LocalSubjectAccessReviewInterface should have comment or be unexported (golint)
    • Line 131: warning: exported type SelfSubjectAccessReviewInterface should have comment or be unexported (golint)
    • image-registry/pkg/testutil/fakeopenshift.go
    • Line 54: warning: exported method FakeOpenShift.CreateImage should have comment or be unexported (golint)
    • Line 69: warning: exported method FakeOpenShift.GetImage should have comment or be unexported (golint)
    • Line 80: warning: exported method FakeOpenShift.UpdateImage should have comment or be unexported (golint)
    • Line 95: warning: exported method FakeOpenShift.CreateImageStream should have comment or be unexported (golint)
    • Line 115: warning: exported method FakeOpenShift.UpdateImageStream should have comment or be unexported (golint)
    • Line 135: warning: exported method FakeOpenShift.GetImageStream should have comment or be unexported (golint)
    • Line 148: warning: exported method FakeOpenShift.ListImageStreams should have comment or be unexported (golint)
    • Line 169: warning: exported method FakeOpenShift.CreateImageStreamMapping should have comment or be unexported (golint)
    • Line 211: warning: exported method FakeOpenShift.CreateImageStreamTag should have comment or be unexported (golint)
    • Line 285: warning: exported method FakeOpenShift.GetImageStreamImage should have comment or be unexported (golint)
    • Line 329: warning: exported method FakeOpenShift.GetImageStreamLayers should have comment or be unexported (golint)
    • image-registry/pkg/testframework/master.go
    • Line 29: warning: exported type MasterInterface should have comment or be unexported (golint)
    • Line 35: warning: exported type MasterProcess should have comment or be unexported (golint)
    • Line 39: warning: exported function StartMasterProcess should have comment or be unexported (golint)
    • Line 48: warning: exported method MasterProcess.AdminKubeConfigPath should have comment or be unexported (golint)
    • Line 52: warning: exported method MasterProcess.Stop should have comment or be unexported (golint)
    • Line 54: warning: exported method MasterProcess.WaitHealthz should have comment or be unexported (golint)
    • Line 85: warning: exported type User should have comment or be unexported (golint)
    • Line 91: warning: exported method User.KubeConfig should have comment or be unexported (golint)
    • Line 95: warning: exported type Repository should have comment or be unexported (golint)
    • Line 102: warning: exported method Repository.BaseURL should have comment or be unexported (golint)
    • Line 106: warning: exported method Repository.RepoName should have comment or be unexported (golint)
    • Line 110: warning: exported method Repository.Transport should have comment or be unexported (golint)
    • Line 114: warning: exported type Master should have comment or be unexported (golint)
    • Line 121: warning: exported function NewMaster should have comment or be unexported (golint)
    • Line 145: warning: exported method Master.WaitForRoles should have comment or be unexported (golint)
    • Line 172: warning: exported method Master.Close should have comment or be unexported (golint)
    • Line 186: warning: exported method Master.AdminKubeConfig should have comment or be unexported (golint)
    • Line 201: warning: exported method Master.StartRegistry should have comment or be unexported (golint)
    • Line 210: warning: exported method Master.CreateUser should have comment or be unexported (golint)
    • Line 222: warning: exported method Master.GrantPrunerRole should have comment or be unexported (golint)
    • Line 238: warning: exported method Master.CreateProject should have comment or be unexported (golint)
    • image-registry/pkg/testframework/manifest.go
    • Line 16: warning: exported type Schema2ImageData should have comment or be unexported (golint)
    • Line 28: warning: exported function NewSchema2ImageData should have comment or be unexported (golint)
    • Line 77: warning: exported function ServeV2 should have comment or be unexported (golint)
    • Line 85: warning: exported function ServeImage should have comment or be unexported (golint)
    • Line 124: warning: exported function PushSchema2ImageData should have comment or be unexported (golint)
    • image-registry/pkg/dockerregistry/server/cache/cache.go
    • Line 16: warning: exported type DigestCache should have comment or be unexported (golint)
    • Line 25: warning: exported type DigestValue should have comment or be unexported (golint)
    • Line 30: warning: exported type DigestItem should have comment or be unexported (golint)
    • Line 46: warning: exported function NewBlobDigest 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!


misspell98%

Misspell Finds commonly misspelled English words