Preparing report...

Report for github.com/Mellanox/network-operator

A+    Excellent!    Found 20 issues across 47 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!


golint57%

Golint is a linter for Go source code.

    • network-operator/api/v1alpha1/nicclusterpolicy_types.go
    • Line 24: warning: exported const NicClusterPolicyCRDName should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: comment on exported type State should be of the form "State ..." (with optional leading article) (golint)
    • Line 33: warning: exported const StateReady should have comment (or a comment on this block) or be unexported (golint)
    • Line 52: warning: exported type PodProbeSpec should have comment or be unexported (golint)
    • Line 94: warning: comment on exported type SecondaryNetworkSpec should be of the form "SecondaryNetworkSpec ..." (with optional leading article) (golint)
    • network-operator/pkg/config/config.go
    • Line 28: warning: comment on exported type OperatorConfig should be of the form "OperatorConfig ..." (with optional leading article) (golint)
    • Line 34: warning: comment on exported type StateConfig should be of the form "StateConfig ..." (with optional leading article) (golint)
    • Line 39: warning: comment on exported type ControllerConfig should be of the form "ControllerConfig ..." (with optional leading article) (golint)
    • Line 46: warning: exported function FromEnv should have comment or be unexported (golint)
    • network-operator/controllers/hostdevicenetwork_controller.go
    • Line 1: warning: package comment should be of the form "Package controllers ..." (golint)
    • Line 53: warning: comment on exported method HostDeviceNetworkReconciler.Reconcile should be of the form "Reconcile ..." (golint)
    • Line 132: warning: comment on exported method HostDeviceNetworkReconciler.SetupWithManager should be of the form "SetupWithManager ..." (golint)
    • network-operator/pkg/consts/consts.go
    • Line 24: warning: comment on exported const LogLevelError should be of the form "LogLevelError ..." (golint)
    • Line 26: warning: exported const LogLevelWarning should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported const NetworkOperatorResourceNamespace should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported const HTTPProxy should have comment (or a comment on this block) or be unexported (golint)
    • network-operator/pkg/state/manager.go
    • Line 26: warning: comment on exported type Manager should be of the form "Manager ..." (with optional leading article) (golint)
    • Line 37: warning: comment on exported type Result should be of the form "Result ..." (with optional leading article) (golint)
    • Line 45: warning: comment on exported type Results should be of the form "Results ..." (with optional leading article) (golint)
    • network-operator/pkg/state/info_source.go
    • Line 23: warning: exported type InfoType should have comment or be unexported (golint)
    • Line 26: warning: exported const InfoTypeNodeInfo should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported function NewInfoCatalog should have comment or be unexported (golint)

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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!