Preparing report...

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

A+    Excellent!    Found 15 issues across 66 files

Tweet

gofmt89%

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!


gocyclo98%

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.


golint87%

Golint is a linter for Go source code.

    • /sigs.k8s.io/cluster-api-provider-gcp/api/v1alpha3/gcpcluster_conversion.go
    • Line 42: warning: receiver name dst should be consistent with previous receiver name src for GCPCluster (golint)
    • Line 64: warning: receiver name dst should be consistent with previous receiver name src for GCPClusterList (golint)
    • Line 70: warning: don't use underscores in Go names; func Convert_v1alpha3_GCPClusterStatus_To_v1alpha4_GCPClusterStatus should be ConvertV1alpha3GCPClusterStatusToV1alpha4GCPClusterStatus (golint)
    • Line 78: warning: comment on exported function Convert_v1alpha3_GCPClusterSpec_To_v1alpha4_GCPClusterSpec should be of the form "Convert_v1alpha3_GCPClusterSpec_To_v1alpha4_GCPClusterSpec ..." (golint)
    • Line 79: warning: don't use underscores in Go names; func Convert_v1alpha3_GCPClusterSpec_To_v1alpha4_GCPClusterSpec should be ConvertV1alpha3GCPClusterSpecToV1alpha4GCPClusterSpec (golint)
    • Line 88: warning: don't use underscores in Go names; func Convert_v1alpha4_GCPClusterSpec_To_v1alpha3_GCPClusterSpec should be ConvertV1alpha4GCPClusterSpecToV1alpha3GCPClusterSpec (golint)
    • Line 96: warning: comment on exported function Convert_v1alpha4_GCPClusterStatus_To_v1alpha3_GCPClusterStatus should be of the form "Convert_v1alpha4_GCPClusterStatus_To_v1alpha3_GCPClusterStatus ..." (golint)
    • Line 97: warning: don't use underscores in Go names; func Convert_v1alpha4_GCPClusterStatus_To_v1alpha3_GCPClusterStatus should be ConvertV1alpha4GCPClusterStatusToV1alpha3GCPClusterStatus (golint)
    • Line 105: warning: comment on exported function Convert_v1alpha3_NetworkSpec_To_v1alpha4_NetworkSpec should be of the form "Convert_v1alpha3_NetworkSpec_To_v1alpha4_NetworkSpec ..." (golint)
    • Line 106: warning: don't use underscores in Go names; func Convert_v1alpha3_NetworkSpec_To_v1alpha4_NetworkSpec should be ConvertV1alpha3NetworkSpecToV1alpha4NetworkSpec (golint)
    • Line 118: warning: comment on exported function Convert_v1alpha4_NetworkSpec_To_v1alpha3_NetworkSpec should be of the form "Convert_v1alpha4_NetworkSpec_To_v1alpha3_NetworkSpec ..." (golint)
    • Line 119: warning: don't use underscores in Go names; func Convert_v1alpha4_NetworkSpec_To_v1alpha3_NetworkSpec should be ConvertV1alpha4NetworkSpecToV1alpha3NetworkSpec (golint)
    • Line 132: warning: don't use underscores in Go names; func Convert_v1alpha3_APIEndpoint_To_v1alpha4_APIEndpoint should be ConvertV1alpha3APIEndpointToV1alpha4APIEndpoint (golint)
    • Line 137: warning: don't use underscores in Go names; func Convert_v1alpha4_APIEndpoint_To_v1alpha3_APIEndpoint should be ConvertV1alpha4APIEndpointToV1alpha3APIEndpoint (golint)
    • /sigs.k8s.io/cluster-api-provider-gcp/api/v1alpha3/gcpmachine_conversion.go
    • Line 39: warning: receiver name dst should be consistent with previous receiver name src for GCPMachine (golint)
    • Line 60: warning: receiver name dst should be consistent with previous receiver name src for GCPMachineList (golint)
    • Line 65: warning: exported function Convert_v1alpha3_GCPMachineSpec_To_v1alpha4_GCPMachineSpec should have comment or be unexported (golint)
    • Line 65: warning: don't use underscores in Go names; func Convert_v1alpha3_GCPMachineSpec_To_v1alpha4_GCPMachineSpec should be ConvertV1alpha3GCPMachineSpecToV1alpha4GCPMachineSpec (golint)
    • Line 74: warning: don't use underscores in Go names; func Convert_v1alpha4_GCPMachineSpec_To_v1alpha3_GCPMachineSpec should be ConvertV1alpha4GCPMachineSpecToV1alpha3GCPMachineSpec (golint)
    • Line 83: warning: don't use underscores in Go names; func Convert_v1alpha3_GCPMachineStatus_To_v1alpha4_GCPMachineStatus should be ConvertV1alpha3GCPMachineStatusToV1alpha4GCPMachineStatus (golint)
    • Line 92: warning: don't use underscores in Go names; func Convert_v1alpha4_GCPMachineStatus_To_v1alpha3_GCPMachineStatus should be ConvertV1alpha4GCPMachineStatusToV1alpha3GCPMachineStatus (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!