Preparing report...

Report for github.com/f5devcentral/container-egress-service

(v0.5.0)

A    Great!    Found 21 issues across 61 files

Tweet

gofmt72%

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!


gocyclo86%

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.

    • pkg/as3/utils.go
    • Line 491: warning: cyclomatic complexity 24 of function (*as3Post).dealRule() is high (> 15) (gocyclo)
    • Line 951: warning: cyclomatic complexity 18 of function clearUpUnreferencePolicy() is high (> 15) (gocyclo)
    • Line 848: warning: cyclomatic complexity 16 of function fullResource() is high (> 15) (gocyclo)

golint81%

Golint is a linter for Go source code.

    • pkg/apis/kubeovn.io/v1alpha1/types_clusteregressrule.go
    • Line 5: warning: comment on exported type ClusterEgressRule should be of the form "ClusterEgressRule ..." (with optional leading article) (golint)
    • Line 24: warning: exported type ClusterEgressRuleStatus should have comment or be unexported (golint)
    • Line 28: warning: exported type ClusterEgressRulePhase should have comment or be unexported (golint)
    • Line 31: warning: exported const ClusterEgressRuleSuccess should have comment (or a comment on this block) or be unexported (golint)
    • pkg/apis/kubeovn.io/v1alpha1/types_namespaceegressrule.go
    • Line 25: warning: exported type NamespaceEgressRuleStatus should have comment or be unexported (golint)
    • Line 29: warning: exported type NamespaceEgressRulePhase should have comment or be unexported (golint)
    • Line 32: warning: exported const NamespaceEgressRuleSuccess should have comment (or a comment on this block) or be unexported (golint)
    • pkg/apis/kubeovn.io/v1alpha1/types_serviceegressrule.go
    • Line 42: warning: exported type ServiceEgressRuleStatus should have comment or be unexported (golint)
    • Line 46: warning: exported type ServiceEgressRulePhase should have comment or be unexported (golint)
    • Line 49: warning: exported const ServiceEgressRuleSuccess should have comment (or a comment on this block) or be unexported (golint)
    • pkg/controller/controller.go
    • Line 45: warning: exported const ControllerAgentName should have comment or be unexported (golint)
    • Line 47: warning: exported const ControllerConfigmap should have comment or be unexported (golint)
    • Line 53: warning: exported const FailedSynced should have comment (or a comment on this block) or be unexported (golint)
    • Line 187: warning: exported method Controller.Run should have comment or be unexported (golint)
    • pkg/as3/init.go
    • Line 12: warning: exported function InitAs3Tenant should have comment or be unexported (golint)
    • Line 104: warning: exported function GetTenantConfigForParttition should have comment or be unexported (golint)
    • Line 135: warning: exported function GetTenantConfigForNamespace should have comment or be unexported (golint)
    • Line 154: warning: exported function GetDefaultTemplate should have comment or be unexported (golint)
    • Line 159: warning: exported function GetCluster should have comment or be unexported (golint)
    • Line 180: warning: exported function IsSupportRouteDomain should have comment or be unexported (golint)
    • Line 224: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • Line 230: warning: exported function GetIRules should have comment or be unexported (golint)
    • Line 235: warning: exported function GetClusterSvcExtNamespace should have comment or be unexported (golint)
    • pkg/as3/request.go
    • Line 13: warning: exported method Client.As3Request should have comment or be unexported (golint)
    • Line 112: warning: exported method Client.UpdateBigIPSourceAddress should have comment or be unexported (golint)
    • Line 158: warning: exported method Client.Work should have comment or be unexported (golint)
    • pkg/as3/types.go
    • Line 26: warning: comment on exported type PatchBody should be of the form "PatchBody ..." (with optional leading article) (golint)
    • Line 60: warning: exported type IRule should have comment or be unexported (golint)
    • Line 64: warning: comment on exported type FirewallDestination should be of the form "FirewallDestination ..." (with optional leading article) (golint)
    • Line 70: warning: comment on exported type FirewallSource should be of the form "FirewallSource ..." (with optional leading article) (golint)
    • Line 73: warning: comment on exported type Use should be of the form "Use ..." (with optional leading article) (golint)
    • Line 78: warning: exported type FirewallPolicy should have comment or be unexported (golint)
    • Line 83: warning: exported type F5ApiResponse should have comment or be unexported (golint)
    • Line 88: warning: exported type Pool should have comment or be unexported (golint)
    • Line 94: warning: exported type Member should have comment or be unexported (golint)
    • Line 100: warning: exported type Monitor should have comment or be unexported (golint)
    • Line 104: warning: exported type VirtualServer should have comment or be unexported (golint)
    • Line 117: warning: comment on exported type As3Config should be of the form "As3Config ..." (with optional leading article) (golint)
    • Line 117: warning: comment on exported type Gwpool should be of the form "Gwpool ..." (with optional leading article) (golint)
    • Line 117: warning: comment on exported type LogPool should be of the form "LogPool ..." (with optional leading article) (golint)
    • Line 117: warning: comment on exported type RouteDomain should be of the form "RouteDomain ..." (with optional leading article) (golint)
    • Line 117: warning: comment on exported type TenantConfig should be of the form "TenantConfig ..." (with optional leading article) (golint)
    • Line 117: warning: comment on exported type VirtualService should be of the form "VirtualService ..." (with optional leading article) (golint)
    • Line 163: warning: comment on exported type BigIpAddressList should be of the form "BigIpAddressList ..." (with optional leading article) (golint)
    • Line 163: warning: comment on exported type BigIpAddresses should be of the form "BigIpAddresses ..." (with optional leading article) (golint)
    • pkg/as3/client.go
    • Line 44: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 99: warning: exported method Client.Get should have comment or be unexported (golint)
    • Line 139: warning: exported method Client.PostRaw should have comment or be unexported (golint)
    • pkg/as3/const.go
    • Line 4: warning: comment on exported const OpAdd should be of the form "OpAdd ..." (golint)
    • Line 6: warning: exported const OpRemove should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported const ClassADC should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: comment on exported const ClassFirewallAddressList should be of the form "ClassFirewallAddressList ..." (golint)
    • Line 30: warning: exported const ClassKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported const RuleTypeLabel should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: exported const DenyAllRuleName should have comment (or a comment on this block) or be unexported (golint)
    • Line 61: warning: exported const NamespaceCidr should have comment (or a comment on this block) or be unexported (golint)
    • pkg/as3/utils.go
    • Line 614: warning: don't use underscores in Go names; var ty_ns should be tyNs (golint)
    • Line 622: warning: don't use underscores in Go names; var ty_ns should be tyNs (golint)
    • Line 630: warning: don't use underscores in Go names; var ty_ns should be tyNs (golint)
    • Line 641: warning: don't use underscores in Go names; var ty_ns should be tyNs (golint)
    • Line 998: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!