Gofmt formats Go programs. We run gofmt -s
on your code, where -s
is for the "simplify" command
No problems detected. Good job!
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!
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!
Golint is a linter for Go source code.
-
harbor-scanner-clair/pkg/etc/config.go
- Line 18: warning: exported type Config should have comment or be unexported (golint)
- Line 26: warning: exported type APIConfig should have comment or be unexported (golint)
- Line 35: warning: exported method APIConfig.IsTLSEnabled should have comment or be unexported (golint)
- Line 39: warning: exported type TLSConfig should have comment or be unexported (golint)
- Line 46: warning: exported type ClairConfig should have comment or be unexported (golint)
- Line 51: warning: exported type RedisPool should have comment or be unexported (golint)
- Line 61: warning: exported type RedisStore should have comment or be unexported (golint)
- Line 66: warning: exported function GetLogLevel should have comment or be unexported (golint)
- Line 77: warning: exported function GetConfig should have comment or be unexported (golint)
- Line 114: warning: exported function GetScannerMetadata should have comment or be unexported (golint)
-
harbor-scanner-clair/pkg/http/api/server.go
- Line 12: warning: exported type Server should have comment or be unexported (golint)
- Line 17: warning: exported function NewServer should have comment or be unexported (golint)
- Line 30: warning: exported method Server.ListenAndServe should have comment or be unexported (golint)
- Line 70: warning: exported method Server.Shutdown should have comment or be unexported (golint)
-
harbor-scanner-clair/pkg/job/job.go
- Line 7: warning: exported type Status should have comment or be unexported (golint)
- Line 10: warning: exported const Pending should have comment (or a comment on this block) or be unexported (golint)
- Line 23: warning: exported type ScanJob should have comment or be unexported (golint)
-
harbor-scanner-clair/pkg/harbor/model.go
- Line 67: warning: exported type Registry should have comment or be unexported (golint)
- Line 72: warning: exported type Artifact should have comment or be unexported (golint)
- Line 78: warning: exported type ScanRequest should have comment or be unexported (golint)
- Line 83: warning: exported type ScanResponse should have comment or be unexported (golint)
- Line 87: warning: exported type ScanReport should have comment or be unexported (golint)
- Line 106: warning: exported type Scanner should have comment or be unexported (golint)
- Line 112: warning: exported type Capability should have comment or be unexported (golint)
- Line 117: warning: exported type ScannerMetadata should have comment or be unexported (golint)
-
harbor-scanner-clair/pkg/mock/store.go
- Line 9: warning: exported type Store should have comment or be unexported (golint)
- Line 13: warning: exported function NewStore should have comment or be unexported (golint)
- Line 17: warning: exported method Store.Create should have comment or be unexported (golint)
- Line 22: warning: exported method Store.Get should have comment or be unexported (golint)
- Line 27: warning: exported method Store.UpdateStatus should have comment or be unexported (golint)
- Line 32: warning: exported method Store.UpdateReport should have comment or be unexported (golint)
-
harbor-scanner-clair/pkg/mock/enqueuer.go
- Line 8: warning: exported type Enqueuer should have comment or be unexported (golint)
- Line 12: warning: exported function NewEnqueuer should have comment or be unexported (golint)
- Line 16: warning: exported method Enqueuer.Enqueue should have comment or be unexported (golint)
-
harbor-scanner-clair/pkg/mock/registry_client.go
- Line 10: warning: exported type RegistryClientFactory should have comment or be unexported (golint)
- Line 14: warning: exported type RegistryClient should have comment or be unexported (golint)
- Line 18: warning: exported function NewRegistryClientFactory should have comment or be unexported (golint)
- Line 22: warning: exported function NewRegistryClient should have comment or be unexported (golint)
- Line 26: warning: exported method RegistryClientFactory.Get should have comment or be unexported (golint)
- Line 31: warning: exported method RegistryClient.GetManifest should have comment or be unexported (golint)
-
harbor-scanner-clair/pkg/mock/transformer.go
- Line 10: warning: exported type Transformer should have comment or be unexported (golint)
- Line 14: warning: exported function NewTransformer should have comment or be unexported (golint)
- Line 18: warning: exported method Transformer.ToClairLayers should have comment or be unexported (golint)
- Line 23: warning: exported method Transformer.ToHarborScanReport should have comment or be unexported (golint)
-
harbor-scanner-clair/pkg/http/api/base_handler.go
- Line 13: warning: exported const HeaderContentType should have comment (or a comment on this block) or be unexported (golint)
- Line 16: warning: exported var MimeTypeOCIImageManifest should have comment or be unexported (golint)
- Line 17: warning: exported var MimeTypeDockerDistributionManifest should have comment or be unexported (golint)
- Line 19: warning: exported var MimeTypeVersion should have comment or be unexported (golint)
- Line 20: warning: exported var MimeTypeError should have comment or be unexported (golint)
- Line 21: warning: exported var MimeTypeScanResponse should have comment or be unexported (golint)
- Line 22: warning: exported var MimeTypeScanReport should have comment or be unexported (golint)
- Line 23: warning: exported var MimeTypeMetadata should have comment or be unexported (golint)
- Line 25: warning: exported type MimeTypeParams should have comment or be unexported (golint)
- Line 47: warning: exported type BaseHandler should have comment or be unexported (golint)
- Line 50: warning: exported method BaseHandler.WriteJSON should have comment or be unexported (golint)
- Line 62: warning: exported method BaseHandler.WriteJSONError should have comment or be unexported (golint)
- Line 70: warning: exported method BaseHandler.SendInternalServerError should have comment or be unexported (golint)
-
harbor-scanner-clair/pkg/mock/clair_client.go
- Line 10: warning: exported type ClairClient should have comment or be unexported (golint)
- Line 14: warning: exported function NewClairClient should have comment or be unexported (golint)
- Line 18: warning: exported method ClairClient.ScanLayer should have comment or be unexported (golint)
- Line 23: warning: exported method ClairClient.GetLayer should have comment or be unexported (golint)
- Line 28: warning: exported method ClairClient.GetVulnerabilityDatabaseUpdatedAt should have comment or be unexported (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
No problems detected. Good job!
Misspell Finds commonly misspelled English words
No problems detected. Good job!