Preparing report...

Report for github.com/Azure/azure-container-networking

(v1.6.1)

A+    Excellent!    Found 70 issues across 657 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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo92%

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.

    • cni/network/invoker_cns.go
    • Line 85: warning: cyclomatic complexity 19 of function (*CNSIPAMInvoker).Add() is high (> 15) (gocyclo)
    • Line 377: warning: cyclomatic complexity 16 of function configureDefaultAddResult() is high (> 15) (gocyclo)
    • ipam/manager.go
    • Line 96: warning: cyclomatic complexity 16 of function (*addressManager).restore() is high (> 15) (gocyclo)
    • cns/restserver/util.go
    • Line 384: warning: cyclomatic complexity 22 of function (*HTTPRestService).getAllNetworkContainerResponses() is high (> 15) (gocyclo)
    • Line 140: warning: cyclomatic complexity 22 of function (*HTTPRestService).saveNetworkContainerGoalState() is high (> 15) (gocyclo)
    • Line 599: warning: cyclomatic complexity 18 of function (*HTTPRestService).attachOrDetachHelper() is high (> 15) (gocyclo)
    • cns/restserver/internalapi.go
    • Line 47: warning: cyclomatic complexity 19 of function (*HTTPRestService).SyncNodeStatus() is high (> 15) (gocyclo)
    • Line 189: warning: cyclomatic complexity 19 of function (*HTTPRestService).syncHostNCVersion() is high (> 15) (gocyclo)
    • Line 278: warning: cyclomatic complexity 16 of function (*HTTPRestService).ReconcileIPAMState() is high (> 15) (gocyclo)
    • network/hnswrapper/hnsv2wrapperfake.go
    • Line 65: warning: cyclomatic complexity 32 of function (Hnsv2wrapperFake).ModifyNetworkSettings() is high (> 15) (gocyclo)
    • Line 282: warning: cyclomatic complexity 16 of function (Hnsv2wrapperFake).ApplyEndpointPolicy() is high (> 15) (gocyclo)
    • cns/service/main.go
    • Line 496: warning: cyclomatic complexity 92 of function main() is high (> 15) (gocyclo)
    • Line 1267: warning: cyclomatic complexity 46 of function InitializeCRDState() is high (> 15) (gocyclo)
    • npm/iptm/iptm.go
    • Line 228: warning: cyclomatic complexity 16 of function (*IptablesManager).checkAndAddForwardChain() is high (> 15) (gocyclo)
    • ipam/azure.go
    • Line 73: warning: cyclomatic complexity 20 of function (*azureSource).refresh() is high (> 15) (gocyclo)
    • cni/network/network.go
    • Line 385: warning: cyclomatic complexity 38 of function (*NetPlugin).Add() is high (> 15) (gocyclo)
    • Line 997: warning: cyclomatic complexity 28 of function (*NetPlugin).Delete() is high (> 15) (gocyclo)
    • Line 1203: warning: cyclomatic complexity 22 of function (*NetPlugin).Update() is high (> 15) (gocyclo)

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!