Preparing report...

Report for sigs.k8s.io/cluster-api-provider-kubevirt

(v0.0.0-20211222231103-6aff381714e8)

A+    Excellent!    Found 15 issues across 32 files

Tweet

gofmt93%

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.


golint56%

Golint is a linter for Go source code.

    • pkg/ssh/utils.go
    • Line 126: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 143: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 150: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 157: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • pkg/testing/common.go
    • Line 11: warning: exported function NewCluster should have comment or be unexported (golint)
    • Line 29: warning: exported function NewKubevirtCluster should have comment or be unexported (golint)
    • Line 45: warning: exported function NewKubevirtMachine should have comment or be unexported (golint)
    • Line 72: warning: exported function NewMachine should have comment or be unexported (golint)
    • Line 98: warning: exported function NewVirtualMachineInstance should have comment or be unexported (golint)
    • Line 116: warning: exported function NewBootstrapDataSecret should have comment or be unexported (golint)
    • pkg/kubevirt/utils.go
    • Line 35: warning: exported type CommandExecutor should have comment or be unexported (golint)
    • Line 49: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • pkg/ssh/ssh_command_executor.go
    • Line 28: warning: exported type VMCommandExecutor should have comment or be unexported (golint)
    • Line 38: warning: exported function NewVMCommandExecutor should have comment or be unexported (golint)
    • api/v1alpha1/kubevirtmachine_types.go
    • Line 87: warning: exported method KubevirtMachine.GetConditions should have comment or be unexported (golint)
    • Line 91: warning: exported method KubevirtMachine.SetConditions should have comment or be unexported (golint)
    • api/v1alpha1/kubevirtcluster_types.go
    • Line 97: warning: exported method KubevirtCluster.GetConditions should have comment or be unexported (golint)
    • Line 101: warning: exported method KubevirtCluster.SetConditions should have comment or be unexported (golint)
    • pkg/ssh/cluster_node_ssh_keys.go
    • Line 54: 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 147: 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 152: 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)
    • pkg/workloadcluster/workloadcluster.go
    • Line 11: warning: comment on exported type WorkloadCluster should be of the form "WorkloadCluster ..." (with optional leading article) (golint)
    • Line 16: warning: exported function New 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!