Preparing report...

Report for k8s.io/cloud-provider-azure

A+    Excellent!    Found 37 issues across 255 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!


gocyclo91%

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.

    • /k8s.io/cloud-provider-azure/pkg/provider/azure_test.go
    • Line 2024: warning: cyclomatic complexity 33 of function validateConfig() is high (> 15) (gocyclo)
    • Line 2889: warning: cyclomatic complexity 28 of function TestCanCombineSharedAndPrivateRulesInSameGroup() is high (> 15) (gocyclo)
    • Line 1592: warning: cyclomatic complexity 28 of function validateLoadBalancer() is high (> 15) (gocyclo)
    • Line 2700: warning: cyclomatic complexity 18 of function TestIfSomeServicesShareARuleAndOneIsDeletedItIsRemovedFromTheRightRule() is high (> 15) (gocyclo)
    • Line 2541: warning: cyclomatic complexity 17 of function TestIfServicesSpecifySharedRuleButSomeAreOnDifferentPortsThenRulesAreSeparatedOrConsoliatedByPort() is high (> 15) (gocyclo)
    • /k8s.io/cloud-provider-azure/pkg/provider/azure_vmss.go
    • Line 1055: warning: cyclomatic complexity 30 of function (*ScaleSet).ensureVMSSInPool() is high (> 15) (gocyclo)
    • Line 924: warning: cyclomatic complexity 24 of function (*ScaleSet).EnsureHostInPool() is high (> 15) (gocyclo)
    • Line 1434: warning: cyclomatic complexity 22 of function (*ScaleSet).EnsureBackendPoolDeleted() is high (> 15) (gocyclo)
    • Line 1192: warning: cyclomatic complexity 17 of function (*ScaleSet).EnsureHostsInPool() is high (> 15) (gocyclo)
    • Line 248: warning: cyclomatic complexity 16 of function (*ScaleSet).getVmssVMByInstanceID() is high (> 15) (gocyclo)
    • /k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer.go
    • Line 1425: warning: cyclomatic complexity 30 of function (*Cloud).reconcileLoadBalancer() is high (> 15) (gocyclo)
    • Line 1288: warning: cyclomatic complexity 29 of function (*Cloud).isFrontendIPConfigUnsafeToDelete() is high (> 15) (gocyclo)
    • Line 2223: warning: cyclomatic complexity 27 of function (*Cloud).reconcileSecurityRules() is high (> 15) (gocyclo)
    • Line 1652: warning: cyclomatic complexity 27 of function (*Cloud).reconcileFrontendIPConfigs() is high (> 15) (gocyclo)
    • Line 951: warning: cyclomatic complexity 26 of function (*Cloud).ensurePublicIPExists() is high (> 15) (gocyclo)
    • Line 484: warning: cyclomatic complexity 26 of function (*Cloud).reconcileSharedLoadBalancer() is high (> 15) (gocyclo)
    • Line 2002: warning: cyclomatic complexity 25 of function (*Cloud).getExpectedLBRules() is high (> 15) (gocyclo)
    • Line 623: warning: cyclomatic complexity 24 of function (*Cloud).getServiceLoadBalancer() is high (> 15) (gocyclo)
    • Line 2752: warning: cyclomatic complexity 23 of function (*Cloud).safeDeletePublicIP() is high (> 15) (gocyclo)
    • Line 2141: warning: cyclomatic complexity 20 of function (*Cloud).reconcileSecurityGroup() is high (> 15) (gocyclo)
    • Line 2688: warning: cyclomatic complexity 19 of function (*Cloud).getPublicIPUpdates() is high (> 15) (gocyclo)
    • Line 1236: warning: cyclomatic complexity 18 of function (*Cloud).isFrontendIPChanged() is high (> 15) (gocyclo)
    • Line 2611: warning: cyclomatic complexity 17 of function (*Cloud).reconcilePublicIP() is high (> 15) (gocyclo)

golint92%

Golint is a linter for Go source code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign0%

IneffAssign detects ineffectual assignments in Go code.

An error occurred while running this test (signal: killed)


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!