Preparing report...

Report for github.com/romana/core

A    Great!    Found 84 issues across 123 files

Tweet

gofmt75%

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.

    • core/common/client/ipam.go
    • Line 1440: warning: cyclomatic complexity 24 of function (*IPAM).setTopology() is high (> 15) (gocyclo)
    • Line 1876: warning: cyclomatic complexity 16 of function (*IPAM).BlackOut() is high (> 15) (gocyclo)
    • Line 1646: warning: cyclomatic complexity 16 of function (*IPAM).UpdateHostLabels() is high (> 15) (gocyclo)
    • Line 355: warning: cyclomatic complexity 16 of function (*Group).allocateSpecificIP() is high (> 15) (gocyclo)
    • core/common/client/ipam_test.go
    • Line 384: warning: cyclomatic complexity 30 of function TestBlockReuseMask30() is high (> 15) (gocyclo)
    • Line 120: warning: cyclomatic complexity 20 of function TestBlackout() is high (> 15) (gocyclo)
    • Line 949: warning: cyclomatic complexity 16 of function TestHostAdditionSimple() is high (> 15) (gocyclo)
    • core/doc/tools/code.go
    • Line 437: warning: cyclomatic complexity 21 of function (*Swaggerer).fillProperty() is high (> 15) (gocyclo)
    • Line 504: warning: cyclomatic complexity 21 of function (*Swaggerer).fillSchema() is high (> 15) (gocyclo)
    • Line 370: warning: cyclomatic complexity 21 of function (*Swaggerer).fillItems() is high (> 15) (gocyclo)
    • core/cli/commands/policy.go
    • Line 288: warning: cyclomatic complexity 24 of function policyListShow() is high (> 15) (gocyclo)
    • Line 116: warning: cyclomatic complexity 21 of function policyAdd() is high (> 15) (gocyclo)

golint47%

Golint is a linter for Go source code.

    • core/agent/exec/fake.go
    • Line 35: warning: exported method FakeCmd.StdinPipe should have comment or be unexported (golint)
    • Line 40: warning: exported method FakeCmd.CombinedOutput should have comment or be unexported (golint)
    • Line 46: warning: exported method FakeCmd.Start should have comment or be unexported (golint)
    • Line 50: warning: exported method FakeCmd.Wait should have comment or be unexported (golint)
    • Line 67: warning: exported method FakeExecutor.Cmd should have comment or be unexported (golint)
    • core/common/api/errors/errors.go
    • Line 54: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 70: warning: exported function NewRomanaExistsError should have comment or be unexported (golint)
    • Line 86: warning: exported function NewRomanaExistsErrorWithMessage should have comment or be unexported (golint)
    • Line 95: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • core/agent/metrics.go
    • Line 29: warning: exported var NumManagedRoutes should have comment or be unexported (golint)
    • Line 37: warning: exported function MetricStart should have comment or be unexported (golint)
    • core/common/defs.go
    • Line 20: warning: exported type FindFlag should have comment or be unexported (golint)
    • Line 23: warning: comment on exported const FindFirst should be of the form "FindFirst ..." (golint)
    • Line 25: warning: exported const FindLast should have comment (or a comment on this block) or be unexported (golint)
    • Line 79: warning: comment on exported type ServiceMessage should be of the form "ServiceMessage ..." (with optional leading article) (golint)
    • Line 82: warning: comment on exported type PortUpdateMessage should be of the form "PortUpdateMessage ..." (with optional leading article) (golint)
    • core/common/errors.go
    • Line 31: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 58: warning: comment on exported const StatusUnprocessableEntity should be of the form "StatusUnprocessableEntity ..." (golint)
    • Line 63: warning: exported type ExecErrorDetails should have comment or be unexported (golint)
    • Line 120: warning: receiver name httpErr should be consistent with previous receiver name err for HttpError (golint)
    • Line 134: warning: comment on exported function NewHttpError should be of the form "NewHttpError ..." (golint)
    • Line 169: warning: receiver name m should be consistent with previous receiver name me for MultiError (golint)
    • Line 177: warning: receiver name m should be consistent with previous receiver name me for MultiError (golint)
    • Line 210: warning: receiver name m should be consistent with previous receiver name me for MultiError (golint)
    • core/common/client/store.go
    • Line 43: warning: exported function NewStore should have comment or be unexported (golint)
    • Line 106: warning: exported method Store.Exists should have comment or be unexported (golint)
    • Line 110: warning: exported method Store.PutObject should have comment or be unexported (golint)
    • Line 123: warning: exported method Store.AtomicPut should have comment or be unexported (golint)
    • Line 146: warning: exported method Store.Get should have comment or be unexported (golint)
    • Line 150: warning: exported method Store.GetBool should have comment or be unexported (golint)
    • Line 161: warning: exported method Store.ListObjects should have comment or be unexported (golint)
    • Line 169: warning: exported method Store.GetObject should have comment or be unexported (golint)
    • Line 180: warning: exported method Store.GetString should have comment or be unexported (golint)
    • Line 191: warning: exported method Store.GetInt should have comment or be unexported (golint)
    • Line 339: warning: exported method Store.NewLocker should have comment or be unexported (golint)
    • Line 339: warning: receiver name store should be consistent with previous receiver name s for Store (golint)
    • core/common/api/policy.go
    • Line 25: warning: comment on exported const MaxPortNumber should be of the form "MaxPortNumber ..." (golint)
    • Line 27: warning: exported const MaxIcmpType should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: comment on exported const Wildcard should be of the form "Wildcard ..." (golint)
    • Line 49: warning: exported const PolicyDirectionIngress should have comment (or a comment on this block) or be unexported (golint)
    • Line 53: warning: exported type PortRange should have comment or be unexported (golint)
    • Line 81: warning: exported type Rules should have comment or be unexported (golint)
    • Line 83: warning: comment on exported type Tag should be of the form "Tag ..." (with optional leading article) (golint)
    • Line 106: warning: exported type RomanaIngress should have comment or be unexported (golint)
    • core/routepublisher/bird/bird.go
    • Line 16: warning: package comment should be of the form "Package bird ..." (golint)
    • Line 35: warning: comment on exported type BirdRoutePublisher should be of the form "BirdRoutePublisher ..." (with optional leading article) (golint)
    • Line 74: warning: exported function New should have comment or be unexported (golint)
    • core/agent/iptsave/token.go
    • Line 16: warning: package comment should be of the form "Package iptsave ..." (golint)
    • Line 23: warning: exported type Item should have comment or be unexported (golint)
    • Line 28: warning: exported type ItemType should have comment or be unexported (golint)
    • Line 31: warning: exported const ItemError should have comment (or a comment on this block) or be unexported (golint)
    • core/agent/cache/cache.go
    • Line 20: warning: exported type Interface should have comment or be unexported (golint)
    • Line 28: warning: exported function New should have comment or be unexported (golint)
    • Line 37: warning: exported type Cache should have comment or be unexported (golint)
    • Line 42: warning: exported method Cache.Put should have comment or be unexported (golint)
    • Line 48: warning: exported method Cache.Get should have comment or be unexported (golint)
    • Line 55: warning: exported method Cache.Delete should have comment or be unexported (golint)
    • Line 61: warning: exported method Cache.List should have comment or be unexported (golint)
    • Line 73: warning: exported method Cache.Keys should have comment or be unexported (golint)
    • Line 78: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • core/agent/iptsave/iptables.go
    • Line 16: warning: package comment should be of the form "Package iptsave ..." (golint)
    • Line 31: warning: exported var BuiltinChains should have comment or be unexported (golint)
    • Line 84: warning: comment on exported method IPtable.RenderHeader should be of the form "RenderHeader ..." (golint)
    • Line 94: warning: comment on exported method IPtable.RenderFooter should be of the form "RenderFooter ..." (golint)
    • Line 105: warning: receiver name i should be consistent with previous receiver name it for IPtable (golint)
    • Line 116: warning: receiver name i should be consistent with previous receiver name it for IPtable (golint)
    • Line 221: warning: exported type RenderState should have comment or be unexported (golint)
    • Line 224: warning: exported const RenderAppendRule should have comment (or a comment on this block) or be unexported (golint)
    • Line 515: warning: should omit 2nd value from range; this loop is equivalent to `for sn := range ...` (golint)
    • Line 586: warning: receiver name c should be consistent with previous receiver name ic for IPchain (golint)
    • Line 635: warning: exported type ActionType should have comment or be unexported (golint)
    • Line 638: warning: exported const ActionDefault should have comment (or a comment on this block) or be unexported (golint)
    • core/agent/firewall/defs.go
    • Line 116: warning: comment on exported const ShellexProvider should be of the form "ShellexProvider ..." (golint)
    • Line 120: warning: comment on exported const IPTsaveProvider should be of the form "IPTsaveProvider ..." (golint)
    • Line 153: warning: comment on exported const EnsureLast should be of the form "EnsureLast ..." (golint)
    • Line 157: warning: comment on exported const EnsureFirst should be of the form "EnsureFirst ..." (golint)
    • Line 161: warning: comment on exported const EnsureAbsent should be of the form "EnsureAbsent ..." (golint)
    • Line 194: warning: comment on exported function NewFirewallRule should be of the form "NewFirewallRule ..." (golint)
    • core/listener/translate.go
    • Line 33: warning: exported type PolicyTranslator should have comment or be unexported (golint)
    • Line 45: warning: exported type Translator should have comment or be unexported (golint)
    • Line 52: warning: exported method Translator.Init should have comment or be unexported (golint)
    • Line 59: warning: exported method Translator.GetClient should have comment or be unexported (golint)
    • Line 76: warning: should omit 2nd value from range; this loop is equivalent to `for kubePolicyNumber := range ...` (golint)
    • Line 95: warning: receiver name l should be consistent with previous receiver name t for Translator (golint)
    • Line 124: warning: exported type TenantCacheEntry should have comment or be unexported (golint)
    • Line 129: warning: exported type TranslatorError should have comment or be unexported (golint)
    • Line 138: warning: exported type TranslatorErrorType should have comment or be unexported (golint)
    • Line 141: warning: exported const ErrorCacheUpdate should have comment (or a comment on this block) or be unexported (golint)
    • Line 155: warning: exported const TranslateGroupStartIndex should have comment or be unexported (golint)
    • core/common/helpers.go
    • Line 38: warning: exported const DefaultTestConfigFile should have comment (or a comment on this block) or be unexported (golint)
    • Line 81: warning: exported function String should have comment or be unexported (golint)
    • Line 89: warning: exported method RomanaTestSuite.CleanUp should have comment or be unexported (golint)
    • Line 101: warning: exported method RomanaTestSuite.GetMockSqliteFile should have comment or be unexported (golint)
    • Line 149: warning: exported function PressEnterToContinue should have comment or be unexported (golint)
    • Line 214: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 217: warning: exported function MkMap should have comment or be unexported (golint)
    • Line 221: warning: exported function MkMapStr should have comment or be unexported (golint)
    • Line 237: warning: exported function InitMap should have comment or be unexported (golint)
    • core/common/service.go
    • Line 34: warning: comment on exported const DefaultTimeout should be of the form "DefaultTimeout ..." (golint)
    • Line 77: warning: exported type Links should have comment or be unexported (golint)
    • core/pkg/policytools/blueprint.go
    • Line 30: warning: exported type RuleBlueprint should have comment or be unexported (golint)
    • Line 45: warning: exported function MakeBlueprintKey should have comment or be unexported (golint)
    • Line 59: warning: exported const SchemePolicyOnTop should have comment (or a comment on this block) or be unexported (golint)
    • Line 68: warning: exported const PeerHost should have comment (or a comment on this block) or be unexported (golint)
    • Line 77: warning: exported function DetectPolicyPeerType should have comment or be unexported (golint)
    • Line 126: warning: exported const TargetHost should have comment (or a comment on this block) or be unexported (golint)
    • Line 163: warning: exported function MakeRomanaPolicyNameExtended should have comment or be unexported (golint)
    • Line 167: warning: exported function MakeRomanaPolicyNameRules should have comment or be unexported (golint)
    • Line 171: warning: exported function MakeRomanaPolicyNameSetSrc should have comment or be unexported (golint)
    • Line 175: warning: exported function MakeRomanaPolicyNameSetDst should have comment or be unexported (golint)
    • Line 184: warning: exported function MakePolicyRuleWithAction should have comment or be unexported (golint)
    • Line 239: warning: exported function MakeSrcTenantMatch should have comment or be unexported (golint)
    • Line 240: warning: exported function MakeDstTenantMatch should have comment or be unexported (golint)
    • Line 245: warning: exported function MakeSrcTenantSegmentMatch should have comment or be unexported (golint)
    • Line 246: warning: exported function MakeDstTenantSegmentMatch should have comment or be unexported (golint)
    • Line 251: warning: exported function MakeSrcCIDRMatch should have comment or be unexported (golint)
    • Line 252: warning: exported function MakeDstCIDRMatch should have comment or be unexported (golint)
    • Line 257: warning: exported function MatchEndpoint should have comment or be unexported (golint)
    • Line 260: warning: exported function MatchPolicyString should have comment or be unexported (golint)
    • Line 300: warning: exported function MakeTenantSetName should have comment or be unexported (golint)
    • core/agent/firewall/iptsave.go
    • Line 279: warning: should omit 2nd value from range; this loop is equivalent to `for ruleNum := range ...` (golint)
    • Line 296: warning: should omit 2nd value from range; this loop is equivalent to `for ruleNum := range ...` (golint)
    • core/doc/tools/swagger.go
    • Line 24: warning: comment on exported type SwaggerExternalDocumentation should be of the form "SwaggerExternalDocumentation ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported type SwaggerContact should be of the form "SwaggerContact ..." (with optional leading article) (golint)
    • Line 37: warning: comment on exported type SwaggerLicense should be of the form "SwaggerLicense ..." (with optional leading article) (golint)
    • Line 43: warning: comment on exported type SwaggerInfo should be of the form "SwaggerInfo ..." (with optional leading article) (golint)
    • Line 54: warning: exported const SwaggerInBody should have comment (or a comment on this block) or be unexported (golint)
    • Line 86: warning: exported type SwaggerSchema should have comment or be unexported (golint)
    • Line 113: warning: exported type SwaggerItems should have comment or be unexported (golint)
    • Line 136: warning: exported type SwaggerProperty should have comment or be unexported (golint)
    • Line 161: warning: exported type SwaggerParam should have comment or be unexported (golint)
    • Line 189: warning: exported type SwaggerRef should have comment or be unexported (golint)
    • Line 193: warning: exported type SwaggerParamOrRef should have comment or be unexported (golint)
    • Line 222: warning: exported type SwaggerTag should have comment or be unexported (golint)
    • Line 228: warning: exported type SwaggerSecurityScheme should have comment or be unexported (golint)
    • Line 238: warning: exported type SwaggerHeader should have comment or be unexported (golint)
    • Line 261: warning: exported type SwaggerResponse should have comment or be unexported (golint)
    • Line 268: warning: exported type SwaggerOperation should have comment or be unexported (golint)
    • Line 284: warning: exported type SwaggerPathItem should have comment or be unexported (golint)
    • Line 296: warning: exported type Swagger should have comment or be unexported (golint)
    • Line 308: warning: exported function NewSwagger should have comment or be unexported (golint)
    • core/common/api/romanavip.go
    • Line 18: warning: exported type RomanaVIP should have comment or be unexported (golint)
    • Line 23: warning: exported type ExposedIPSpec should have comment or be unexported (golint)
    • core/agent/enforcer/enforcer.go
    • Line 16: warning: package comment should be of the form "Package enforcer ..." (golint)
    • Line 43: warning: comment on exported type Enforcer should be of the form "Enforcer ..." (with optional leading article) (golint)
    • Line 450: warning: exported function EnsureRules should have comment or be unexported (golint)
    • core/cni/plugin.go
    • Line 16: warning: package comment should be of the form "Package cni ..." (golint)
    • Line 47: warning: exported const DefaultCNILogFile should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: comment on exported function CmdAdd should be of the form "CmdAdd ..." (golint)
    • Line 239: warning: comment on exported function CmdDel should be of the form "CmdDel ..." (golint)
    • core/common/structures.go
    • Line 22: warning: exported type IP should have comment or be unexported (golint)
    • Line 27: warning: exported function MakeIPv4 should have comment or be unexported (golint)
    • Line 32: warning: exported function IPv4ToInt should have comment or be unexported (golint)
    • Line 43: warning: exported function IntToIPv4 should have comment or be unexported (golint)
    • core/listener/listener.go
    • Line 89: warning: exported method KubeListener.GetAddress should have comment or be unexported (golint)
    • Line 136: warning: comment on exported var PTranslator should be of the form "PTranslator ..." (golint)
    • Line 145: warning: exported method KubeListener.Initialize should have comment or be unexported (golint)
    • core/routepublisher/publisher/publisher.go
    • Line 16: warning: package comment should be of the form "Package publisher ..." (golint)
    • Line 24: warning: exported type Config should have comment or be unexported (golint)
    • Line 26: warning: exported method Config.SetDefault should have comment or be unexported (golint)
    • Line 34: warning: exported type Interface should have comment or be unexported (golint)
    • core/common/client/idring/idring.go
    • Line 29: warning: exported var IDRingOverflowError should have comment or be unexported (golint)
    • Line 127: warning: comment on exported method IDRing.Invert should be of the form "Invert ..." (golint)
    • Line 264: warning: error should be the last type when returning multiple items (golint)
    • Line 281: warning: receiver name idRing should be consistent with previous receiver name ir for IDRing (golint)
    • Line 292: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 331: warning: receiver name idRing should be consistent with previous receiver name ir for IDRing (golint)
    • core/agent/firewall/store.go
    • Line 74: warning: receiver name firewallStore should be consistent with previous receiver name fs for firewallStore (golint)
    • Line 93: warning: receiver name firewallStore should be consistent with previous receiver name fs for firewallStore (golint)
    • Line 112: warning: receiver name firewallStore should be consistent with previous receiver name fs for firewallStore (golint)
    • Line 139: warning: receiver name firewallStore should be consistent with previous receiver name fs for firewallStore (golint)
    • Line 165: warning: receiver name firewallStore should be consistent with previous receiver name fs for firewallStore (golint)
    • Line 187: warning: receiver name firewallStore should be consistent with previous receiver name fs for firewallStore (golint)
    • Line 252: warning: receiver name firewallStore should be consistent with previous receiver name fs for firewallStore (golint)
    • core/common/auth.go
    • Line 36: warning: exported const RoleAdmin should have comment (or a comment on this block) or be unexported (golint)
    • Line 58: warning: exported type Role should have comment or be unexported (golint)
    • Line 84: warning: comment on exported type CredentialType should be of the form "CredentialType ..." (with optional leading article) (golint)
    • Line 89: warning: exported const CredentialUsernamePassword should have comment (or a comment on this block) or be unexported (golint)
    • Line 96: warning: comment on exported type Credential should be of the form "Credential ..." (with optional leading article) (golint)
    • Line 120: warning: exported function NewCredentialCobra should have comment or be unexported (golint)
    • Line 127: warning: exported function NewCredential should have comment or be unexported (golint)
    • core/common/client/client.go
    • Line 34: warning: exported const DefaultEtcdPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported type Client should have comment or be unexported (golint)
    • Line 78: warning: exported method Client.ListHosts should have comment or be unexported (golint)
    • Line 82: warning: exported type HostListCallback should have comment or be unexported (golint)
    • Line 84: warning: exported method Client.WatchHostsWithCallback should have comment or be unexported (golint)
    • Line 104: warning: exported type BlocksCallback should have comment or be unexported (golint)
    • Line 106: warning: exported method Client.WatchBlocksWithCallback should have comment or be unexported (golint)
    • Line 217: warning: exported method Client.ListPolicies should have comment or be unexported (golint)
    • core/agent/enforcer/helpers.go
    • Line 30: warning: exported var IptablesSaveBin should have comment or be unexported (golint)
    • Line 116: warning: exported function MakeOperatorPolicyIngressChainName should have comment or be unexported (golint)
    • core/common/middleware.go
    • Line 341: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 423: warning: comment on exported var SupportedContentTypes should be of the form "SupportedContentTypes ..." (golint)
    • Line 427: warning: comment on exported var SupportedContentTypesMessage should be of the form "SupportedContentTypesMessage ..." (golint)
    • Line 519: warning: receiver name f should be consistent with previous receiver name j for formMarshaller (golint)
    • Line 603: warning: exported type UnmarshallerMiddleware should have comment or be unexported (golint)
    • Line 606: warning: exported function NewUnmarshaller should have comment or be unexported (golint)
    • Line 674: warning: exported type NegotiatorMiddleware should have comment or be unexported (golint)
    • Line 677: warning: exported function NewNegotiator should have comment or be unexported (golint)
    • core/doc/tools/code.go
    • Line 44: warning: exported const SwaggerVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 88: warning: exported method Analyzer.Analyze should have comment or be unexported (golint)
    • Line 99: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 256: warning: exported method Analyzer.FindImplementors should have comment or be unexported (golint)
    • Line 709: warning: exported type Swaggerer should have comment or be unexported (golint)
    • core/server/romanad.go
    • Line 24: warning: exported type Romanad should have comment or be unexported (golint)
    • Line 29: warning: exported method Romanad.GetAddress should have comment or be unexported (golint)
    • Line 33: warning: exported method Romanad.Name should have comment or be unexported (golint)
    • Line 37: warning: exported method Romanad.Initialize should have comment or be unexported (golint)
    • core/agent/iptsave/lexer.go
    • Line 16: warning: package comment should be of the form "Package iptsave ..." (golint)
    • Line 37: warning: comment on exported function NewLexer should be of the form "NewLexer ..." (golint)
    • Line 135: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 263: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 272: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 281: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 400: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • core/agent/interface.go
    • Line 27: warning: exported function CreateRomanaGW should have comment or be unexported (golint)
    • Line 48: warning: exported function SetRomanaGwIP should have comment or be unexported (golint)
    • core/common/api/ipam.go
    • Line 23: warning: comment on exported type Tenant should be of the form "Tenant ..." (with optional leading article) (golint)
    • Line 29: warning: exported type Segment should have comment or be unexported (golint)
    • Line 34: warning: exported type IPAMAddressResponse should have comment or be unexported (golint)
    • Line 39: warning: exported type IPAMAddressRequest should have comment or be unexported (golint)
    • Line 46: warning: exported type IPAMNetworkResponse should have comment or be unexported (golint)
    • Line 52: warning: exported type IPAMBlocksResponse should have comment or be unexported (golint)
    • Line 57: warning: exported type IPAMBlockResponse should have comment or be unexported (golint)
    • Line 66: warning: exported type TopologyUpdateRequest should have comment or be unexported (golint)
    • Line 71: warning: exported type NetworkDefinition should have comment or be unexported (golint)
    • Line 79: warning: exported type TopologyDefinition should have comment or be unexported (golint)
    • Line 84: warning: exported type GroupOrHost should have comment or be unexported (golint)
    • Line 104: warning: exported type Host should have comment or be unexported (golint)
    • Line 124: warning: exported type HostList should have comment or be unexported (golint)
    • Line 129: warning: exported type IPNet should have comment or be unexported (golint)
    • Line 133: warning: exported method IPNet.MarshalText should have comment or be unexported (golint)
    • Line 137: warning: exported method IPNet.UnmarshalText should have comment or be unexported (golint)
    • core/agent/policycache/policy_storage.go
    • Line 23: warning: exported type Interface should have comment or be unexported (golint)
    • Line 31: warning: exported type PolicyStorage should have comment or be unexported (golint)
    • Line 35: warning: exported function New should have comment or be unexported (golint)
    • Line 39: warning: exported method PolicyStorage.Put should have comment or be unexported (golint)
    • Line 43: warning: exported method PolicyStorage.Get should have comment or be unexported (golint)
    • Line 57: warning: exported method PolicyStorage.List should have comment or be unexported (golint)
    • Line 70: warning: exported method PolicyStorage.Keys should have comment or be unexported (golint)
    • Line 74: warning: exported method PolicyStorage.Delete should have comment or be unexported (golint)
    • core/agent/romanavip.go
    • Line 38: warning: exported function GetDefaultLink should have comment or be unexported (golint)
    • Line 146: warning: exported function StartRomanaVIPSync should have comment or be unexported (golint)
    • core/cni/cni.go
    • Line 32: warning: exported const DefaultSegmentID should have comment or be unexported (golint)
    • Line 51: warning: exported type RomanaAddressManagerProvider should have comment or be unexported (golint)
    • Line 85: warning: exported type DefaultAddressManager should have comment or be unexported (golint)
    • Line 87: warning: exported method DefaultAddressManager.Allocate should have comment or be unexported (golint)
    • Line 120: warning: exported method DefaultAddressManager.Deallocate should have comment or be unexported (golint)
    • core/common/client/ipam.go
    • Line 48: warning: exported const DefaultAgentPort should have comment (or a comment on this block) or be unexported (golint)
    • Line 137: warning: exported method CIDR.ContainsIP should have comment or be unexported (golint)
    • Line 146: warning: exported method CIDR.DebugString should have comment or be unexported (golint)
    • Line 160: warning: exported method CIDR.MarshalText should have comment or be unexported (golint)
    • Line 167: warning: exported method CIDR.UnmarshalText should have comment or be unexported (golint)
    • Line 167: warning: receiver name cidr should be consistent with previous receiver name c for CIDR (golint)
    • Line 226: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 427: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 534: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 572: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 585: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 599: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 602: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 607: warning: comment on exported method Group.ListHosts should be of the form "ListHosts ..." (golint)
    • Line 617: warning: exported method Group.ListBlocks should have comment or be unexported (golint)
    • Line 1168: warning: exported type IPAM should have comment or be unexported (golint)
    • Line 1189: warning: exported method IPAM.GetPrevKVPair should have comment or be unexported (golint)
    • Line 1193: warning: exported method IPAM.SetPrevKVPair should have comment or be unexported (golint)
    • Line 1215: warning: exported method IPAM.ListHosts should have comment or be unexported (golint)
    • Line 1240: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 1620: warning: exported method IPAM.ListAllBlocks should have comment or be unexported (golint)
    • Line 1632: warning: exported method IPAM.ListNetworkBlocks should have comment or be unexported (golint)
    • Line 1709: warning: exported method IPAM.UpdateHostK8SInfo should have comment or be unexported (golint)
    • Line 1762: warning: exported method IPAM.RemoveHost should have comment or be unexported (golint)
    • core/listener/resources.go
    • Line 46: warning: exported const KubeEventAdded should have comment (or a comment on this block) or be unexported (golint)
    • Line 75: warning: should omit 2nd value from range; this loop is equivalent to `for kn := range ...` (golint)
    • Line 80: warning: should omit 2nd value from range; this loop is equivalent to `for pn := range ...` (golint)
    • Line 103: warning: comment on exported function GetTenantIDFromNamespaceObject should be of the form "GetTenantIDFromNamespaceObject ..." (golint)
    • Line 108: warning: comment on exported function GetTenantIDFromNamespaceName should be of the form "GetTenantIDFromNamespaceName ..." (golint)
    • Line 397: warning: should omit 2nd value from range; this loop is equivalent to `for en := range ...` (golint)
    • Line 401: 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.


misspell86%

Misspell Finds commonly misspelled English words

    • core/agent/iptsave/lexer.go
    • Line 241: warning: "deafult" is a misspelling of "default" (misspell)
    • Line 264: warning: "deafult" is a misspelling of "default" (misspell)
    • Line 273: warning: "deafult" is a misspelling of "default" (misspell)
    • Line 282: warning: "deafult" is a misspelling of "default" (misspell)