Preparing report...

Report for github.com/aquasecurity/starboard-operator

A+    Excellent!    Found 16 issues across 27 files

Tweet

gofmt96%

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!


gocyclo96%

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.


golint44%

Golint is a linter for Go source code.

    • starboard-operator/pkg/etc/config.go
    • Line 12: warning: exported const LabelPodSpecHash should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type VersionInfo should have comment or be unexported (golint)
    • Line 21: warning: exported type Config should have comment or be unexported (golint)
    • Line 27: warning: exported type Operator should have comment or be unexported (golint)
    • Line 37: warning: exported type ScannerTrivy should have comment or be unexported (golint)
    • Line 43: warning: exported type ScannerAquaCSP should have comment or be unexported (golint)
    • Line 52: warning: exported function GetOperatorConfig should have comment or be unexported (golint)
    • Line 80: warning: exported const InstallModeOwnNamespace should have comment (or a comment on this block) or be unexported (golint)
    • starboard-operator/pkg/controller/job/job_controller.go
    • Line 32: warning: exported type JobController should have comment or be unexported (golint)
    • Line 41: warning: exported method JobController.Reconcile should have comment or be unexported (golint)
    • Line 135: warning: exported method JobController.GetPodControlledBy should have comment or be unexported (golint)
    • Line 169: warning: exported method JobController.SetupWithManager should have comment or be unexported (golint)
    • starboard-operator/pkg/aqua/client/types.go
    • Line 3: warning: exported type VulnerabilitiesResponse should have comment or be unexported (golint)
    • Line 8: warning: exported type VulnerabilitiesResponseResult should have comment or be unexported (golint)
    • Line 20: warning: exported type Resource should have comment or be unexported (golint)
    • Line 28: warning: exported type RegistryResponse should have comment or be unexported (golint)
    • starboard-operator/pkg/reports/store.go
    • Line 35: warning: exported type StoreInterface should have comment or be unexported (golint)
    • Line 41: warning: exported type Store should have comment or be unexported (golint)
    • Line 46: warning: exported function NewStore should have comment or be unexported (golint)
    • Line 53: warning: exported method Store.SaveVulnerabilityReports should have comment or be unexported (golint)
    • Line 107: warning: exported method Store.GetVulnerabilityReportsByOwnerAndHash should have comment or be unexported (golint)
    • Line 158: warning: exported method Store.HasVulnerabilityReports should have comment or be unexported (golint)
    • Line 165: warning: should omit 2nd value from range; this loop is equivalent to `for containerName := range ...` (golint)
    • Line 170: warning: should omit 2nd value from range; this loop is equivalent to `for containerName := range ...` (golint)
    • starboard-operator/pkg/aqua/scanner/cli/types.go
    • Line 3: warning: exported type ResourceType should have comment or be unexported (golint)
    • Line 7: warning: exported const Library should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: exported type ScanReport should have comment or be unexported (golint)
    • Line 25: warning: exported type ResourceScan should have comment or be unexported (golint)
    • Line 31: warning: exported type Resource should have comment or be unexported (golint)
    • Line 38: warning: exported type Vulnerability should have comment or be unexported (golint)
    • Line 58: warning: exported type VulnerabilitySummary should have comment or be unexported (golint)
    • Line 69: warning: exported type ScanOptions should have comment or be unexported (golint)
    • Line 81: warning: exported type Warning should have comment or be unexported (golint)
    • starboard-operator/pkg/aqua/client/client.go
    • Line 16: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 17: warning: exported var ErrUnauthorized should have comment or be unexported (golint)
    • Line 44: warning: exported type ImagesInterface should have comment or be unexported (golint)
    • Line 48: warning: exported type RegistriesInterface should have comment or be unexported (golint)
    • Line 82: warning: exported method Client.Images should have comment or be unexported (golint)
    • Line 86: warning: exported method Client.Registries should have comment or be unexported (golint)
    • Line 90: warning: exported type Images should have comment or be unexported (golint)
    • Line 94: warning: exported method Images.Vulnerabilities should have comment or be unexported (golint)
    • Line 124: warning: exported type Registries should have comment or be unexported (golint)
    • Line 128: warning: exported method Registries.List 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!