Preparing report...

Report for github.com/vmware-tanzu/antrea

D    Needs lots of improvement    Found 184 issues across 781 files

Tweet

gofmt0%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

An error occurred while running this test (AddError: could not parse "_repos/src/github.com/vmware-tanzu/antrea/pkg/legacyclient/clientset/versioned/typed/controlplane/v1beta2/fake/fatal error: runtime: out of memory:1::warning: file is not gofmted with -s (gofmt)" - strconv.Atoi: parsing " runtime": invalid syntax)


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!


gocyclo93%

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.

    • antrea/pkg/agent/controller/egress/egress_controller.go
    • Line 446: warning: cyclomatic complexity 19 of function (*EgressController).syncEgress() is high (> 15) (gocyclo)
    • Line 591: warning: cyclomatic complexity 16 of function (*EgressController).watchEgressGroup() is high (> 15) (gocyclo)
    • Line 273: warning: cyclomatic complexity 16 of function (*EgressController).realizeEgressIP() is high (> 15) (gocyclo)
    • antrea/pkg/agent/agent.go
    • Line 634: warning: cyclomatic complexity 18 of function (*Initializer).initNodeLocalConfig() is high (> 15) (gocyclo)
    • Line 297: warning: cyclomatic complexity 16 of function (*Initializer).initOpenFlowPipeline() is high (> 15) (gocyclo)
    • antrea/test/e2e/networkpolicy_test.go
    • Line 37: warning: cyclomatic complexity 23 of function TestNetworkPolicyStats() is high (> 15) (gocyclo)
    • Line 602: warning: cyclomatic complexity 18 of function TestNetworkPolicyResyncAfterRestart() is high (> 15) (gocyclo)
    • Line 191: warning: cyclomatic complexity 17 of function (*TestData).setupDifferentNamedPorts() is high (> 15) (gocyclo)
    • antrea/pkg/antctl/command_list.go
    • Line 114: warning: cyclomatic complexity 16 of function (*commandList).GetDebugCommands() is high (> 15) (gocyclo)
    • Line 48: warning: cyclomatic complexity 16 of function (*commandList).applyToRootCommand() is high (> 15) (gocyclo)
    • antrea/test/e2e/antreapolicy_test.go
    • Line 2903: warning: cyclomatic complexity 19 of function TestAntreaClusterNetworkPolicyStats() is high (> 15) (gocyclo)
    • Line 2750: warning: cyclomatic complexity 19 of function TestANPNetworkPolicyStatsWithDropAction() is high (> 15) (gocyclo)
    • antrea/pkg/antctl/command_definition.go
    • Line 282: warning: cyclomatic complexity 25 of function (*commandDefinition).validate() is high (> 15) (gocyclo)
    • Line 528: warning: cyclomatic complexity 21 of function (*commandDefinition).tableOutputForQueryEndpoint() is high (> 15) (gocyclo)
    • antrea/test/e2e/legacyantreapolicy_test.go
    • Line 2301: warning: cyclomatic complexity 19 of function TestLegacyANPNetworkPolicyStatsWithDropAction() is high (> 15) (gocyclo)
    • Line 2454: warning: cyclomatic complexity 19 of function TestLegacyAntreaClusterNetworkPolicyStats() is high (> 15) (gocyclo)
    • antrea/test/e2e/basic_test.go
    • Line 323: warning: cyclomatic complexity 37 of function testReconcileGatewayRoutesOnStartup() is high (> 15) (gocyclo)
    • Line 95: warning: cyclomatic complexity 18 of function (*TestData).testDeletePod() is high (> 15) (gocyclo)

golint0%

Golint is a linter for Go source code.

An error occurred while running this test (exit status 3)


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell0%

Misspell Finds commonly misspelled English words

An error occurred while running this test (exit status 2)