Preparing report...

Report for github.com/projectcalico/libcalico-go

A+    Excellent!    Found 235 issues across 398 files

Tweet

gofmt97%

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!


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.

    • libcalico-go/lib/ipam/ipam.go
    • Line 550: warning: cyclomatic complexity 30 of function (ipamClient).autoAssign() is high (> 15) (gocyclo)
    • Line 426: warning: cyclomatic complexity 21 of function (*blockAssignState).findOrClaimBlock() is high (> 15) (gocyclo)
    • Line 830: warning: cyclomatic complexity 21 of function (ipamClient).ReleaseIPs() is high (> 15) (gocyclo)
    • Line 731: warning: cyclomatic complexity 20 of function (ipamClient).AssignIP() is high (> 15) (gocyclo)
    • Line 319: warning: cyclomatic complexity 17 of function (ipamClient).prepareAffinityBlocksForHost() is high (> 15) (gocyclo)
    • libcalico-go/lib/validator/v3/validator.go
    • Line 957: warning: cyclomatic complexity 45 of function validateRule() is high (> 15) (gocyclo)
    • Line 1260: warning: cyclomatic complexity 22 of function validateGlobalNetworkPolicy() is high (> 15) (gocyclo)
    • Line 851: warning: cyclomatic complexity 18 of function validateIPPoolSpec() is high (> 15) (gocyclo)
    • Line 759: warning: cyclomatic complexity 18 of function validateWorkloadEndpointSpec() is high (> 15) (gocyclo)
    • Line 691: warning: cyclomatic complexity 18 of function validateFelixConfigSpec() is high (> 15) (gocyclo)

golint49%

Golint is a linter for Go source code.

    • libcalico-go/lib/upgrade/migrator/clients/v1/k8s/resources/globalfelixconfig.go
    • Line 31: warning: exported const GlobalFelixConfigResourceName should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported function NewGlobalFelixConfigClient should have comment or be unexported (golint)
    • Line 52: warning: exported method GlobalFelixConfigConverter.ListInterfaceToKey should have comment or be unexported (golint)
    • Line 52: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 60: warning: exported method GlobalFelixConfigConverter.KeyToName should have comment or be unexported (golint)
    • Line 60: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 64: warning: exported method GlobalFelixConfigConverter.NameToKey should have comment or be unexported (golint)
    • Line 64: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 68: warning: exported method GlobalFelixConfigConverter.ToKVPair should have comment or be unexported (golint)
    • Line 79: warning: exported method GlobalFelixConfigConverter.FromKVPair should have comment or be unexported (golint)
    • libcalico-go/lib/errors/errors.go
    • Line 25: warning: comment on exported type ErrorDatastoreError should be of the form "ErrorDatastoreError ..." (with optional leading article) (golint)
    • Line 35: warning: exported method ErrorDatastoreError.Status should have comment or be unexported (golint)
    • Line 52: warning: comment on exported type ErrorResourceDoesNotExist should be of the form "ErrorResourceDoesNotExist ..." (with optional leading article) (golint)
    • Line 63: warning: comment on exported type ErrorOperationNotSupported should be of the form "ErrorOperationNotSupported ..." (with optional leading article) (golint)
    • Line 73: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 78: warning: comment on exported type ErrorResourceAlreadyExists should be of the form "ErrorResourceAlreadyExists ..." (with optional leading article) (golint)
    • Line 89: warning: comment on exported type ErrorConnectionUnauthorized should be of the form "ErrorConnectionUnauthorized ..." (with optional leading article) (golint)
    • Line 98: warning: comment on exported type ErrorValidation should be of the form "ErrorValidation ..." (with optional leading article) (golint)
    • Line 103: warning: exported type ErroredField should have comment or be unexported (golint)
    • Line 137: warning: comment on exported type ErrorInsufficientIdentifiers should be of the form "ErrorInsufficientIdentifiers ..." (with optional leading article) (golint)
    • Line 147: warning: comment on exported type ErrorResourceUpdateConflict should be of the form "ErrorResourceUpdateConflict ..." (with optional leading article) (golint)
    • Line 157: warning: comment on exported type ErrorPartialFailure should be of the form "ErrorPartialFailure ..." (with optional leading article) (golint)
    • Line 195: warning: comment on exported type ErrorParsingDatastoreEntry should be of the form "ErrorParsingDatastoreEntry ..." (with optional leading article) (golint)
    • libcalico-go/lib/backend/etcdv3/inline_cert_key.go
    • Line 34: warning: comment on exported type TlsInlineCertKey should be of the form "TlsInlineCertKey ..." (with optional leading article) (golint)
    • Line 41: warning: comment on exported method TlsInlineCertKey.ClientConfigInlineCertKey should be of the form "ClientConfigInlineCertKey ..." (golint)
    • libcalico-go/lib/backend/model/resource.go
    • Line 132: warning: exported type ResourceKey should have comment or be unexported (golint)
    • Line 175: warning: exported type ResourceListOptions should have comment or be unexported (golint)
    • Line 186: warning: comment on exported method ResourceListOptions.IsLastSegmentIsPrefix should be of the form "IsLastSegmentIsPrefix ..." (golint)
    • Line 195: warning: exported method ResourceListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • libcalico-go/lib/backend/compat/compat.go
    • Line 32: warning: exported type ModelAdaptor should have comment or be unexported (golint)
    • Line 38: warning: exported function NewAdaptor should have comment or be unexported (golint)
    • Line 42: warning: exported method ModelAdaptor.EnsureInitialized should have comment or be unexported (golint)
    • Line 46: warning: exported method ModelAdaptor.Clean should have comment or be unexported (golint)
    • Line 149: warning: comment on exported method ModelAdaptor.Apply should be of the form "Apply ..." (golint)
    • Line 221: warning: exported method ModelAdaptor.DeleteKVP should have comment or be unexported (golint)
    • Line 238: 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 258: 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 269: warning: exported method ModelAdaptor.Watch should have comment or be unexported (golint)
    • libcalico-go/lib/backend/model/workloadendpoint.go
    • Line 35: warning: exported type WorkloadEndpointKey should have comment or be unexported (golint)
    • Line 88: warning: exported type WorkloadEndpointListOptions should have comment or be unexported (golint)
    • Line 116: warning: exported method WorkloadEndpointListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 151: warning: exported type WorkloadEndpoint should have comment or be unexported (golint)
    • Line 168: warning: exported type EndpointPort should have comment or be unexported (golint)
    • Line 174: warning: comment on exported type IPNAT should be of the form "IPNAT ..." (with optional leading article) (golint)
    • libcalico-go/lib/backend/k8s/resources/resources.go
    • Line 33: warning: comment on exported type Resource should be of the form "Resource ..." (with optional leading article) (golint)
    • Line 39: warning: comment on exported type ResourceList should be of the form "ResourceList ..." (with optional leading article) (golint)
    • Line 45: warning: comment on exported type ConvertK8sResourceToKVPair should be of the form "ConvertK8sResourceToKVPair ..." (with optional leading article) (golint)
    • Line 48: warning: exported type ConvertK8sResourceToKVPairs should have comment or be unexported (golint)
    • Line 64: warning: comment on exported function SetK8sAnnotationsFromCalicoMetadata should be of the form "SetK8sAnnotationsFromCalicoMetadata ..." (golint)
    • Line 95: warning: comment on exported function SetCalicoMetadataFromK8sAnnotations should be of the form "SetCalicoMetadataFromK8sAnnotations ..." (golint)
    • Line 127: warning: comment on exported function ConvertCalicoResourceToK8sResource should be of the form "ConvertCalicoResourceToK8sResource ..." (golint)
    • Line 172: warning: comment on exported function ConvertK8sResourceToCalicoResource should be of the form "ConvertK8sResourceToCalicoResource ..." (golint)
    • libcalico-go/lib/apis/v3/bgppeer.go
    • Line 25: warning: exported const KindBGPPeer should have comment (or a comment on this block) or be unexported (golint)
    • Line 88: warning: exported type SourceAddress should have comment or be unexported (golint)
    • Line 91: warning: exported const SourceAddressUseNodeIP should have comment (or a comment on this block) or be unexported (golint)
    • libcalico-go/lib/net/mac.go
    • Line 22: warning: comment on exported type MAC should be of the form "MAC ..." (with optional leading article) (golint)
    • Line 40: 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)
    • libcalico-go/lib/upgrade/migrator/clients/v1/compat/compat.go
    • Line 29: warning: exported type ModelAdaptor should have comment or be unexported (golint)
    • Line 33: warning: exported function NewAdaptor should have comment or be unexported (golint)
    • Line 37: warning: comment on exported method ModelAdaptor.IsKDD should be of the form "IsKDD ..." (golint)
    • Line 43: warning: exported method ModelAdaptor.Update should have comment or be unexported (golint)
    • Line 67: 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 87: 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)
    • libcalico-go/lib/testutils/e2e_describe.go
    • Line 3: warning: package comment should be of the form "Package testutils ..." (golint)
    • Line 21: warning: should not use dot imports (golint)
    • Line 24: warning: exported type DatastoreType should have comment or be unexported (golint)
    • Line 27: warning: exported const DatastoreEtcdV3 should have comment (or a comment on this block) or be unexported (golint)
    • libcalico-go/lib/ipam/ipam_block_reader_writer.go
    • Line 53: 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 456: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • libcalico-go/lib/hwm/hwm.go
    • Line 15: warning: package comment should be of the form "Package hwm ..." (golint)
    • Line 23: warning: comment on exported type HighWatermarkTracker should be of the form "HighWatermarkTracker ..." (with optional leading article) (golint)
    • Line 31: warning: exported function NewHighWatermarkTracker should have comment or be unexported (golint)
    • Line 38: warning: exported method HighWatermarkTracker.StartTrackingDeletions should have comment or be unexported (golint)
    • Line 43: warning: exported method HighWatermarkTracker.StopTrackingDeletions should have comment or be unexported (golint)
    • Line 48: warning: exported method HighWatermarkTracker.StoreUpdate should have comment or be unexported (golint)
    • Line 73: warning: exported method HighWatermarkTracker.StoreDeletion should have comment or be unexported (golint)
    • Line 116: warning: exported method HighWatermarkTracker.DeleteOldKeys should have comment or be unexported (golint)
    • Line 142: warning: exported method HighWatermarkTracker.ToMap should have comment or be unexported (golint)
    • libcalico-go/lib/apis/v1/policy.go
    • Line 47: warning: exported method Policy.GetResourceMetadata should have comment or be unexported (golint)
    • Line 142: warning: exported const PolicyTypeIngress should have comment (or a comment on this block) or be unexported (golint)
    • libcalico-go/lib/apis/v3/policy.go
    • Line 25: warning: exported const PolicyTypeIngress should have comment (or a comment on this block) or be unexported (golint)
    • Line 172: warning: exported type ServiceAccountMatch should have comment or be unexported (golint)
    • Line 183: warning: exported type Action should have comment or be unexported (golint)
    • Line 186: warning: exported const Allow should have comment (or a comment on this block) or be unexported (golint)
    • Line 192: warning: exported type RuleMetadata should have comment or be unexported (golint)
    • libcalico-go/lib/client/ippool.go
    • Line 26: warning: comment on exported type IPPoolInterface should be of the form "IPPoolInterface ..." (with optional leading article) (golint)
    • Line 87: 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 104: 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)
    • libcalico-go/lib/numorstring/type.go
    • Line 17: warning: comment on exported type NumOrStringType should be of the form "NumOrStringType ..." (with optional leading article) (golint)
    • Line 21: warning: exported const NumOrStringNum should have comment (or a comment on this block) or be unexported (golint)
    • libcalico-go/lib/apis/v1/workloadendpoint.go
    • Line 25: warning: exported type WorkloadEndpoint should have comment or be unexported (golint)
    • Line 31: warning: exported method WorkloadEndpoint.GetResourceMetadata should have comment or be unexported (golint)
    • Line 77: warning: comment on exported type WorkloadEndpointSpec should be of the form "WorkloadEndpointSpec ..." (with optional leading article) (golint)
    • Line 113: warning: comment on exported type IPNAT should be of the form "IPNAT ..." (with optional leading article) (golint)
    • Line 123: warning: exported type EndpointPort should have comment or be unexported (golint)
    • libcalico-go/lib/testutils/resources.go
    • Line 3: warning: package comment should be of the form "Package testutils ..." (golint)
    • Line 22: warning: should not use dot imports (golint)
    • Line 23: warning: should not use dot imports (golint)
    • Line 38: warning: exported const ExpectNoNamespace should have comment or be unexported (golint)
    • Line 46: warning: exported function Resource should have comment or be unexported (golint)
    • Line 50: warning: exported function ResourceWithStatus should have comment or be unexported (golint)
    • Line 54: warning: comment on exported var MatchResource should be of the form "MatchResource ..." (golint)
    • Line 90: warning: comment on exported function NewTestResourceWatch should be of the form "NewTestResourceWatch ..." (golint)
    • libcalico-go/lib/upgrade/migrator/clients/v1/k8s/resources/nodebgppeer.go
    • Line 27: warning: exported function NewNodeBGPPeerClient should have comment or be unexported (golint)
    • Line 39: warning: exported method NodeBGPPeerConverter.ListInterfaceToNodeAndName should have comment or be unexported (golint)
    • Line 39: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 43: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 48: warning: exported method NodeBGPPeerConverter.KeyToNodeAndName should have comment or be unexported (golint)
    • Line 48: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 53: warning: exported method NodeBGPPeerConverter.NodeAndNameToKey should have comment or be unexported (golint)
    • Line 53: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • libcalico-go/lib/upgrade/converters/node.go
    • Line 30: warning: exported type Node should have comment or be unexported (golint)
    • Line 32: warning: comment on exported method Node.APIV1ToBackendV1 should be of the form "APIV1ToBackendV1 ..." (golint)
    • Line 79: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 87: warning: comment on exported method Node.BackendV1ToAPIV3 should be of the form "BackendV1ToAPIV3 ..." (golint)
    • Line 92: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • libcalico-go/lib/apis/v1/unversioned/types.go
    • Line 17: warning: comment on exported type Resource should be of the form "Resource ..." (with optional leading article) (golint)
    • Line 22: warning: comment on exported type ResourceObject should be of the form "ResourceObject ..." (with optional leading article) (golint)
    • Line 41: warning: comment on exported type TypeMetadata should be of the form "TypeMetadata ..." (with optional leading article) (golint)
    • Line 49: warning: exported method TypeMetadata.GetTypeMetadata should have comment or be unexported (golint)
    • Line 53: warning: comment on exported type ResourceMetadata should be of the form "ResourceMetadata ..." (with optional leading article) (golint)
    • Line 59: warning: comment on exported type ObjectMetadata should be of the form "ObjectMetadata ..." (with optional leading article) (golint)
    • Line 67: warning: exported method ObjectMetadata.GetObjectMetadata should have comment or be unexported (golint)
    • Line 71: warning: comment on exported type ListMetadata should be of the form "ListMetadata ..." (with optional leading article) (golint)
    • libcalico-go/lib/backend/model/hostendpoint.go
    • Line 35: warning: exported type HostEndpointKey should have comment or be unexported (golint)
    • Line 68: warning: exported type HostEndpointListOptions should have comment or be unexported (golint)
    • Line 86: warning: exported method HostEndpointListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 106: warning: exported type HostEndpoint should have comment or be unexported (golint)
    • libcalico-go/lib/net/ipnet.go
    • Line 22: warning: comment on exported type IPNet should be of the form "IPNet ..." (with optional leading article) (golint)
    • Line 70: warning: exported function ParseCIDR should have comment or be unexported (golint)
    • Line 90: warning: comment on exported function ParseCIDROrIP should be of the form "ParseCIDROrIP ..." (golint)
    • libcalico-go/lib/testutils/syncertester.go
    • Line 3: warning: package comment should be of the form "Package testutils ..." (golint)
    • Line 21: warning: should not use dot imports (golint)
    • Line 22: warning: should not use dot imports (golint)
    • Line 31: warning: comment on exported function NewSyncerTester should be of the form "NewSyncerTester ..." (golint)
    • Line 42: warning: exported var UnsetSyncStatus should have comment or be unexported (golint)
    • Line 51: warning: exported type SyncerTester should have comment or be unexported (golint)
    • Line 237: warning: comment on exported method SyncerTester.ExpectValueMatches should be of the form "ExpectValueMatches ..." (golint)
    • Line 259: warning: comment on exported method SyncerTester.GetCacheKVPair should be of the form "GetCacheKVPair ..." (golint)
    • Line 295: warning: comment on exported method SyncerTester.ExpectUpdates should be of the form "ExpectUpdates ..." (golint)
    • Line 324: warning: comment on exported method SyncerTester.ExpectOnUpdates should be of the form "ExpectOnUpdates ..." (golint)
    • Line 350: warning: comment on exported method SyncerTester.ExpectParseError should be of the form "ExpectParseError ..." (golint)
    • Line 371: warning: comment on exported method SyncerTester.BlockUpdateHandling should be of the form "BlockUpdateHandling ..." (golint)
    • Line 376: warning: comment on exported method SyncerTester.UnblockUpdateHandling should be of the form "UnblockUpdateHandling ..." (golint)
    • libcalico-go/lib/apis/v1/hostendpoint.go
    • Line 32: warning: exported method HostEndpoint.GetResourceMetadata should have comment or be unexported (golint)
    • Line 104: warning: comment on exported function NewHostEndpointList should be of the form "NewHostEndpointList ..." (golint)
    • libcalico-go/lib/apis/v1/ippool.go
    • Line 38: warning: exported method IPPool.GetResourceMetadata should have comment or be unexported (golint)
    • Line 68: warning: exported type IPIPConfiguration should have comment or be unexported (golint)
    • Line 100: warning: comment on exported function NewIPPoolList should be of the form "NewIPPoolList ..." (golint)
    • libcalico-go/lib/numorstring/asnumber.go
    • Line 25: warning: exported type ASNumber should have comment or be unexported (golint)
    • Line 55: 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 63: 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)
    • libcalico-go/lib/upgrade/migrator/migrate.go
    • Line 89: warning: comment on exported type ErrorType should be of the form "ErrorType ..." (with optional leading article) (golint)
    • Line 93: warning: exported const ErrorGeneric should have comment (or a comment on this block) or be unexported (golint)
    • Line 98: warning: exported type MigrationError should have comment or be unexported (golint)
    • libcalico-go/lib/health/health.go
    • Line 140: warning: exported function NewHealthAggregator should have comment or be unexported (golint)
    • Line 205: warning: comment on exported const StatusGood should be of the form "StatusGood ..." (golint)
    • Line 210: warning: comment on exported const StatusBad should be of the form "StatusBad ..." (golint)
    • libcalico-go/lib/backend/model/ipam_config.go
    • Line 22: warning: exported const IPAMConfigGlobalName should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported type IPAMConfigKey should have comment or be unexported (golint)
    • Line 51: warning: exported type IPAMConfig should have comment or be unexported (golint)
    • libcalico-go/lib/numorstring/protocol.go
    • Line 20: warning: exported const ProtocolUDP should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported type Protocol should have comment or be unexported (golint)
    • Line 108: warning: comment on exported method Protocol.ToV1 should be of the form "ToV1 ..." (golint)
    • Line 122: warning: comment on exported method Protocol.SupportsPorts should be of the form "SupportsPorts ..." (golint)
    • Line 128: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • libcalico-go/lib/ipam/ipam_win_test.go
    • Line 101: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 148: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 217: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 243: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 334: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 342: warning: don't use underscores in Go names; var v4_next should be v4Next (golint)
    • Line 377: warning: don't use underscores in Go names; var args_1 should be args1 (golint)
    • Line 385: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 399: warning: don't use underscores in Go names; var args_2 should be args2 (golint)
    • Line 483: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 561: warning: context.Context should be the first parameter of a function (golint)
    • libcalico-go/lib/names/hostname.go
    • Line 13: 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)
    • libcalico-go/lib/numorstring/port.go
    • Line 42: warning: exported function NamedPort should have comment or be unexported (golint)
    • Line 106: 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)
    • libcalico-go/lib/client/node.go
    • Line 108: 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)
    • libcalico-go/lib/selector/parser/ast.go
    • Line 61: warning: exported type Visitor should have comment or be unexported (golint)
    • Line 71: warning: exported method PrefixVisitor.Visit should have comment or be unexported (golint)
    • Line 138: warning: exported type LabelEqValueNode should have comment or be unexported (golint)
    • Line 143: warning: exported method LabelEqValueNode.Evaluate should have comment or be unexported (golint)
    • Line 151: warning: exported method LabelEqValueNode.AcceptVisitor should have comment or be unexported (golint)
    • Line 159: warning: exported type LabelContainsValueNode should have comment or be unexported (golint)
    • Line 164: warning: exported method LabelContainsValueNode.Evaluate should have comment or be unexported (golint)
    • Line 172: warning: exported method LabelContainsValueNode.AcceptVisitor should have comment or be unexported (golint)
    • Line 180: warning: exported type LabelStartsWithValueNode should have comment or be unexported (golint)
    • Line 185: warning: exported method LabelStartsWithValueNode.Evaluate should have comment or be unexported (golint)
    • Line 193: warning: exported method LabelStartsWithValueNode.AcceptVisitor should have comment or be unexported (golint)
    • Line 201: warning: exported type LabelEndsWithValueNode should have comment or be unexported (golint)
    • Line 206: warning: exported method LabelEndsWithValueNode.Evaluate should have comment or be unexported (golint)
    • Line 214: warning: exported method LabelEndsWithValueNode.AcceptVisitor should have comment or be unexported (golint)
    • Line 222: warning: exported type LabelInSetNode should have comment or be unexported (golint)
    • Line 227: warning: exported method LabelInSetNode.Evaluate should have comment or be unexported (golint)
    • Line 235: warning: exported method LabelInSetNode.AcceptVisitor should have comment or be unexported (golint)
    • Line 243: warning: exported type LabelNotInSetNode should have comment or be unexported (golint)
    • Line 248: warning: exported method LabelNotInSetNode.AcceptVisitor should have comment or be unexported (golint)
    • Line 252: warning: exported method LabelNotInSetNode.Evaluate should have comment or be unexported (golint)
    • Line 287: warning: exported type LabelNeValueNode should have comment or be unexported (golint)
    • Line 292: warning: exported method LabelNeValueNode.Evaluate should have comment or be unexported (golint)
    • Line 300: warning: exported method LabelNeValueNode.AcceptVisitor should have comment or be unexported (golint)
    • Line 308: warning: exported type HasNode should have comment or be unexported (golint)
    • Line 312: warning: exported method HasNode.Evaluate should have comment or be unexported (golint)
    • Line 320: warning: exported method HasNode.AcceptVisitor should have comment or be unexported (golint)
    • Line 328: warning: exported type NotNode should have comment or be unexported (golint)
    • Line 332: warning: exported method NotNode.Evaluate should have comment or be unexported (golint)
    • Line 336: warning: exported method NotNode.AcceptVisitor should have comment or be unexported (golint)
    • Line 346: warning: exported type AndNode should have comment or be unexported (golint)
    • Line 350: warning: exported method AndNode.Evaluate should have comment or be unexported (golint)
    • Line 359: warning: exported method AndNode.AcceptVisitor should have comment or be unexported (golint)
    • Line 377: warning: exported type OrNode should have comment or be unexported (golint)
    • Line 381: warning: exported method OrNode.Evaluate should have comment or be unexported (golint)
    • Line 390: warning: exported method OrNode.AcceptVisitor should have comment or be unexported (golint)
    • Line 408: warning: exported type AllNode should have comment or be unexported (golint)
    • Line 411: warning: exported method AllNode.Evaluate should have comment or be unexported (golint)
    • Line 415: warning: exported method AllNode.AcceptVisitor should have comment or be unexported (golint)
    • Line 433: warning: exported type GlobalNode should have comment or be unexported (golint)
    • Line 436: warning: exported method GlobalNode.Evaluate should have comment or be unexported (golint)
    • Line 441: warning: exported method GlobalNode.AcceptVisitor should have comment or be unexported (golint)
    • libcalico-go/lib/backend/model/felixconfig.go
    • Line 36: warning: exported type ReadyFlagKey should have comment or be unexported (golint)
    • Line 59: warning: exported type GlobalConfigKey should have comment or be unexported (golint)
    • Line 87: warning: exported type GlobalConfigListOptions should have comment or be unexported (golint)
    • Line 100: warning: exported method GlobalConfigListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 115: warning: exported type HostConfigKey should have comment or be unexported (golint)
    • Line 147: warning: exported type HostConfigListOptions should have comment or be unexported (golint)
    • Line 165: warning: exported method HostConfigListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • libcalico-go/lib/backend/model/keys.go
    • Line 71: warning: comment on exported type ListInterface should be of the form "ListInterface ..." (with optional leading article) (golint)
    • Line 138: warning: exported function KeyToValueType should have comment or be unexported (golint)
    • Line 353: warning: comment on exported function SerializeValue should be of the form "SerializeValue ..." (golint)
    • libcalico-go/lib/upgrade/migrator/clients/v1/k8s/resources/globalbgpconfig.go
    • Line 31: warning: exported const GlobalBGPConfigResourceName should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported function NewGlobalBGPConfigClient should have comment or be unexported (golint)
    • Line 52: warning: exported method GlobalBGPConfigConverter.ListInterfaceToKey should have comment or be unexported (golint)
    • Line 52: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 59: warning: exported method GlobalBGPConfigConverter.KeyToName should have comment or be unexported (golint)
    • Line 59: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 63: warning: exported method GlobalBGPConfigConverter.NameToKey should have comment or be unexported (golint)
    • Line 63: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 67: warning: exported method GlobalBGPConfigConverter.ToKVPair should have comment or be unexported (golint)
    • Line 78: warning: exported method GlobalBGPConfigConverter.FromKVPair should have comment or be unexported (golint)
    • libcalico-go/lib/apiconfig/apiconfig.go
    • Line 25: warning: exported type DatastoreType should have comment or be unexported (golint)
    • Line 28: warning: exported const EtcdV3 should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: exported type EtcdConfig should have comment or be unexported (golint)
    • Line 67: warning: exported type KubeConfig should have comment or be unexported (golint)
    • libcalico-go/lib/backend/api/api.go
    • Line 127: warning: exported type Syncer should have comment or be unexported (golint)
    • Line 135: warning: exported type SyncerCallbacks should have comment or be unexported (golint)
    • Line 164: warning: exported type UpdateType should have comment or be unexported (golint)
    • Line 167: warning: exported const UpdateTypeKVUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 173: warning: comment on exported type WatchInterface should be of the form "WatchInterface ..." (with optional leading article) (golint)
    • Line 194: warning: exported const WatchAdded should have comment (or a comment on this block) or be unexported (golint)
    • Line 200: warning: comment on exported type WatchEvent should be of the form "WatchEvent ..." (with optional leading article) (golint)
    • libcalico-go/lib/scope/scope.go
    • Line 17: warning: exported type Scope should have comment or be unexported (golint)
    • Line 20: warning: exported const Undefined should have comment (or a comment on this block) or be unexported (golint)
    • libcalico-go/lib/set/set.go
    • Line 24: warning: exported type Set should have comment or be unexported (golint)
    • Line 42: warning: error var StopIteration should have name of the form ErrFoo (golint)
    • Line 42: warning: exported var StopIteration should have comment or be unexported (golint)
    • Line 43: warning: error var RemoveItem should have name of the form ErrFoo (golint)
    • Line 46: warning: exported function New should have comment or be unexported (golint)
    • Line 50: warning: exported function From should have comment or be unexported (golint)
    • Line 56: warning: exported function FromArray should have comment or be unexported (golint)
    • Line 62: warning: exported function Empty should have comment or be unexported (golint)
    • libcalico-go/lib/net/ip.go
    • Line 23: warning: comment on exported type IP should be of the form "IP ..." (with optional leading article) (golint)
    • Line 109: warning: exported function IPToBigInt should have comment or be unexported (golint)
    • Line 112: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 117: warning: exported function BigIntToIP should have comment or be unexported (golint)
    • Line 126: warning: exported function IncrementIP should have comment or be unexported (golint)
    • libcalico-go/lib/backend/syncersv1/updateprocessors/configurationprocessor.go
    • Line 33: warning: exported const AllowAnnotations should have comment (or a comment on this block) or be unexported (golint)
    • Line 82: warning: comment on exported type NodeConfigKeyFn should be of the form "NodeConfigKeyFn ..." (with optional leading article) (golint)
    • Line 85: warning: comment on exported type GlobalConfigKeyFn should be of the form "GlobalConfigKeyFn ..." (with optional leading article) (golint)
    • Line 88: warning: comment on exported type ConfigFieldValueToV1ModelValue should be of the form "ConfigFieldValueToV1ModelValue ..." (with optional leading article) (golint)
    • Line 129: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 352: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • libcalico-go/lib/backend/k8s/conversion/conversion.go
    • Line 43: warning: exported const SelectorNamespace should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: exported type Converter should have comment or be unexported (golint)
    • Line 69: warning: exported function NewConverter should have comment or be unexported (golint)
    • Line 157: warning: exported function IsFinished should have comment or be unexported (golint)
    • libcalico-go/lib/apis/v3/felixconfig.go
    • Line 23: warning: exported type IptablesBackend should have comment or be unexported (golint)
    • Line 26: warning: exported const KindFelixConfiguration should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: comment on exported type AWSSrcDstCheckOption should be of the form "AWSSrcDstCheckOption ..." (with optional leading article) (golint)
    • Line 36: warning: exported const AWSSrcDstCheckOptionDoNothing should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: comment on exported type FelixConfiguration should be of the form "FelixConfiguration ..." (with optional leading article) (golint)
    • Line 377: warning: exported type RouteTableRange should have comment or be unexported (golint)
    • Line 399: warning: comment on exported function NewFelixConfiguration should be of the form "NewFelixConfiguration ..." (golint)
    • libcalico-go/lib/backend/model/region.go
    • Line 20: warning: exported const NoRegion should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: exported function RegionString should have comment or be unexported (golint)
    • Line 27: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 32: warning: exported function ErrorSlashInRegionString should have comment or be unexported (golint)
    • libcalico-go/lib/backend/model/networkset.go
    • Line 35: warning: exported type NetworkSetKey should have comment or be unexported (golint)
    • Line 63: warning: exported type NetworkSetListOptions should have comment or be unexported (golint)
    • Line 76: warning: exported method NetworkSetListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 91: warning: exported type NetworkSet should have comment or be unexported (golint)
    • libcalico-go/lib/upgrade/migrator/clients/v1/k8s/resources/customresource.go
    • Line 33: warning: comment on exported type CustomK8sResource should be of the form "CustomK8sResource ..." (with optional leading article) (golint)
    • Line 39: warning: comment on exported type CustomK8sList should be of the form "CustomK8sList ..." (with optional leading article) (golint)
    • Line 133: 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)
    • libcalico-go/lib/numorstring/uint8orstring.go
    • Line 22: warning: comment on exported type Uint8OrString should be of the form "Uint8OrString ..." (with optional leading article) (golint)
    • Line 59: 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)
    • libcalico-go/lib/backend/syncersv1/updateprocessors/rules.go
    • Line 31: warning: exported function RulesAPIV2ToBackend should have comment or be unexported (golint)
    • Line 43: warning: comment on exported function GetEntityRuleSelector should be of the form "GetEntityRuleSelector ..." (golint)
    • Line 128: warning: comment on exported function RuleAPIV2ToBackend should be of the form "RuleAPIV2ToBackend ..." (golint)
    • Line 279: warning: exported function ConvertStringsToNets should have comment or be unexported (golint)
    • libcalico-go/lib/apis/v3/ipam_block.go
    • Line 22: warning: exported const KindIPAMBlock should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: exported type AllocationAttribute should have comment or be unexported (golint)
    • libcalico-go/lib/apis/v3/node.go
    • Line 24: warning: exported const KindNode should have comment (or a comment on this block) or be unexported (golint)
    • Line 75: warning: exported type NodeStatus should have comment or be unexported (golint)
    • libcalico-go/lib/backend/model/block.go
    • Line 31: warning: comment on exported const IPAMBlockAttributePod should be of the form "IPAMBlockAttributePod ..." (golint)
    • Line 33: warning: exported const IPAMBlockAttributeNamespace should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: exported type BlockKey should have comment or be unexported (golint)
    • Line 76: warning: exported type BlockListOptions should have comment or be unexported (golint)
    • Line 88: warning: exported method BlockListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 104: warning: exported type AllocationBlock should have comment or be unexported (golint)
    • Line 118: warning: exported method AllocationBlock.MarkDeleted should have comment or be unexported (golint)
    • Line 122: warning: exported method AllocationBlock.IsDeleted should have comment or be unexported (golint)
    • Line 126: warning: exported method AllocationBlock.Host should have comment or be unexported (golint)
    • Line 133: warning: exported type Allocation should have comment or be unexported (golint)
    • Line 138: warning: exported method AllocationBlock.NonAffineAllocations should have comment or be unexported (golint)
    • Line 163: warning: comment on exported method AllocationBlock.NumAddresses should be of the form "NumAddresses ..." (golint)
    • Line 170: warning: comment on exported method AllocationBlock.IPToOrdinal should be of the form "IPToOrdinal ..." (golint)
    • Line 181: warning: comment on exported method AllocationBlock.OrdinalToIP should be of the form "OrdinalToIP ..." (golint)
    • Line 187: warning: exported type AllocationAttribute should have comment or be unexported (golint)
    • libcalico-go/lib/upgrade/converters/rules_def.go
    • Line 68: warning: exported var V1InRule1 should have comment or be unexported (golint)
    • Line 90: warning: exported var V1ModelInRule1 should have comment or be unexported (golint)
    • Line 109: warning: exported var V3InRule1 should have comment or be unexported (golint)
    • Line 126: warning: exported var V1InRule2 should have comment or be unexported (golint)
    • Line 138: warning: exported var V1ModelInRule2 should have comment or be unexported (golint)
    • Line 149: warning: exported var V3InRule2 should have comment or be unexported (golint)
    • Line 160: warning: exported var V1EgressRule1 should have comment or be unexported (golint)
    • Line 172: warning: exported var V1ModelEgressRule1 should have comment or be unexported (golint)
    • Line 183: warning: exported var V3EgressRule1 should have comment or be unexported (golint)
    • Line 194: warning: exported var V1EgressRule2 should have comment or be unexported (golint)
    • Line 206: warning: exported var V1ModelEgressRule2 should have comment or be unexported (golint)
    • Line 217: warning: exported var V3EgressRule2 should have comment or be unexported (golint)
    • libcalico-go/lib/backend/model/block_affinity.go
    • Line 34: warning: exported type BlockAffinityState should have comment or be unexported (golint)
    • Line 37: warning: exported const StateConfirmed should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: exported type BlockAffinityKey should have comment or be unexported (golint)
    • Line 47: warning: exported type BlockAffinity should have comment or be unexported (golint)
    • Line 77: warning: exported type BlockAffinityListOptions should have comment or be unexported (golint)
    • Line 94: warning: exported method BlockAffinityListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • libcalico-go/lib/backend/model/node.go
    • Line 42: warning: exported type Node should have comment or be unexported (golint)
    • Line 58: warning: exported type OrchRef should have comment or be unexported (golint)
    • Line 63: warning: exported type Wireguard should have comment or be unexported (golint)
    • Line 68: warning: exported type NodeKey should have comment or be unexported (golint)
    • Line 92: warning: exported type NodeListOptions should have comment or be unexported (golint)
    • Line 100: warning: exported method NodeListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 112: warning: exported type HostMetadata should have comment or be unexported (golint)
    • Line 115: warning: exported type HostMetadataKey should have comment or be unexported (golint)
    • Line 145: warning: exported type HostMetadataListOptions should have comment or be unexported (golint)
    • Line 152: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 157: warning: exported method HostMetadataListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 161: 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 167: warning: comment on exported type HostIPKey should be of the form "HostIPKey ..." (with optional leading article) (golint)
    • Line 193: warning: exported type OrchRefKey should have comment or be unexported (golint)
    • Line 218: warning: exported type OrchRefListOptions should have comment or be unexported (golint)
    • Line 226: warning: exported method OrchRefListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 230: warning: comment on exported type WireguardKey should be of the form "WireguardKey ..." (with optional leading article) (golint)
    • Line 259: warning: exported type WireguardListOptions should have comment or be unexported (golint)
    • Line 266: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 271: warning: exported method WireguardListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 275: 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)
    • libcalico-go/lib/client/profile.go
    • Line 69: 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)
    • libcalico-go/lib/logutils/logutils.go
    • Line 76: warning: exported method Formatter.Format should have comment or be unexported (golint)
    • Line 155: warning: exported type ContextHook should have comment or be unexported (golint)
    • Line 158: warning: exported method ContextHook.Levels should have comment or be unexported (golint)
    • Line 162: warning: exported method ContextHook.Fire should have comment or be unexported (golint)
    • Line 213: warning: exported type QueuedLog should have comment or be unexported (golint)
    • Line 224: warning: exported method QueuedLog.OnLogDone should have comment or be unexported (golint)
    • Line 230: warning: exported function NewStreamDestination should have comment or be unexported (golint)
    • Line 253: warning: exported function NewSyslogDestination should have comment or be unexported (golint)
    • Line 276: warning: exported type Destination should have comment or be unexported (golint)
    • Line 387: warning: exported function NewBackgroundHook should have comment or be unexported (golint)
    • Line 401: warning: exported method BackgroundHook.Levels should have comment or be unexported (golint)
    • Line 405: warning: exported method BackgroundHook.Fire should have comment or be unexported (golint)
    • Line 466: warning: exported method BackgroundHook.Start should have comment or be unexported (golint)
    • Line 472: warning: comment on exported function SafeParseLogLevel should be of the form "SafeParseLogLevel ..." (golint)
    • libcalico-go/lib/backend/k8s/k8s.go
    • Line 53: warning: exported type KubeClient should have comment or be unexported (golint)
    • Line 76: warning: exported function NewKubeClient should have comment or be unexported (golint)
    • Line 249: warning: exported function CreateKubernetesClientset should have comment or be unexported (golint)
    • Line 328: warning: comment on exported method KubeClient.GetResourceClientFromResourceKind should be of the form "GetResourceClientFromResourceKind ..." (golint)
    • Line 338: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 348: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 364: warning: comment on exported method KubeClient.Clean should be of the form "Clean ..." (golint)
    • Line 538: warning: comment on exported method KubeClient.Apply should be of the form "Apply ..." (golint)
    • Line 571: warning: comment on exported method KubeClient.DeleteKVP should be of the form "DeleteKVP ..." (golint)
    • Line 628: warning: comment on exported method KubeClient.Watch should be of the form "Watch ..." (golint)
    • libcalico-go/lib/client/policy.go
    • Line 69: 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)
    • libcalico-go/lib/backend/model/policy.go
    • Line 35: warning: exported type PolicyKey should have comment or be unexported (golint)
    • Line 64: warning: exported type PolicyListOptions should have comment or be unexported (golint)
    • Line 77: warning: exported method PolicyListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 92: warning: exported type Policy should have comment or be unexported (golint)
    • libcalico-go/lib/backend/model/profile.go
    • Line 35: warning: comment on exported type ProfileKey should be of the form "ProfileKey ..." (with optional leading article) (golint)
    • Line 120: warning: exported type ProfileListOptions should have comment or be unexported (golint)
    • Line 133: warning: exported method ProfileListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 158: warning: comment on exported type Profile should be of the form "Profile ..." (with optional leading article) (golint)
    • Line 167: warning: exported type ProfileRules should have comment or be unexported (golint)
    • Line 172: warning: exported method ProfileListOptions.ListConvert should have comment or be unexported (golint)
    • Line 172: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • libcalico-go/lib/backend/model/hostendpointstatus.go
    • Line 34: warning: exported type HostEndpointStatusKey should have comment or be unexported (golint)
    • Line 67: warning: exported type HostEndpointStatusListOptions should have comment or be unexported (golint)
    • Line 85: warning: exported method HostEndpointStatusListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 105: warning: exported type HostEndpointStatus should have comment or be unexported (golint)
    • libcalico-go/lib/watch/interface.go
    • Line 37: warning: comment on exported const Added should be of the form "Added ..." (golint)
    • Line 50: warning: exported const Modified should have comment (or a comment on this block) or be unexported (golint)
    • libcalico-go/lib/apis/v1/apiconfig.go
    • Line 19: warning: exported type DatastoreType should have comment or be unexported (golint)
    • Line 22: warning: exported const EtcdV2 should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported type EtcdConfig should have comment or be unexported (golint)
    • Line 61: warning: exported type KubeConfig should have comment or be unexported (golint)
    • libcalico-go/lib/apis/v1/node.go
    • Line 45: warning: exported method Node.GetResourceMetadata should have comment or be unexported (golint)
    • Line 81: warning: comment on exported type NodeBGPSpec should be of the form "NodeBGPSpec ..." (with optional leading article) (golint)
    • libcalico-go/lib/ipam/ipam.go
    • Line 44: warning: comment on exported const AttributePod should be of the form "AttributePod ..." (golint)
    • Line 47: warning: exported const AttributeNamespace should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: exported var ErrBlockLimit should have comment or be unexported (golint)
    • Line 280: 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 463: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 536: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 870: 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 965: 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 1437: 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 1933: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • libcalico-go/lib/backend/encap/ipip.go
    • Line 17: warning: exported type Mode should have comment or be unexported (golint)
    • Line 20: warning: exported const Undefined should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported const DefaultMode should have comment or be unexported (golint)
    • libcalico-go/lib/apis/v3/bgpconfig.go
    • Line 24: warning: exported const KindBGPConfiguration should have comment (or a comment on this block) or be unexported (golint)
    • Line 122: warning: comment on exported function NewBGPConfiguration should be of the form "NewBGPConfiguration ..." (golint)
    • libcalico-go/lib/backend/model/ipam_handle.go
    • Line 32: warning: exported type IPAMHandleKey should have comment or be unexported (golint)
    • Line 60: warning: exported type IPAMHandleListOptions should have comment or be unexported (golint)
    • Line 70: warning: exported method IPAMHandleListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 80: warning: exported type IPAMHandle should have comment or be unexported (golint)
    • libcalico-go/lib/apis/v3/globalnetworkset.go
    • Line 22: warning: exported const KindGlobalNetworkSet should have comment (or a comment on this block) or be unexported (golint)
    • Line 65: warning: comment on exported function NewGlobalNetworkSetList should be of the form "NewGlobalNetworkSetList ..." (golint)
    • libcalico-go/lib/apis/v1/profile.go
    • Line 34: warning: exported method Profile.GetResourceMetadata should have comment or be unexported (golint)
    • Line 91: warning: comment on exported function NewProfileList should be of the form "NewProfileList ..." (golint)
    • libcalico-go/lib/apis/v3/clusterinfo.go
    • Line 22: warning: exported const KindClusterInformation should have comment (or a comment on this block) or be unexported (golint)
    • Line 63: warning: comment on exported function NewClusterInformation should be of the form "NewClusterInformation ..." (golint)
    • libcalico-go/lib/apis/v3/kubecontrollersconfig.go
    • Line 22: warning: exported const KindKubeControllersConfiguration should have comment (or a comment on this block) or be unexported (golint)
    • Line 89: warning: exported type AutoHostEndpointConfig should have comment or be unexported (golint)
    • Line 144: warning: comment on exported function NewKubeControllersConfiguration should be of the form "NewKubeControllersConfiguration ..." (golint)
    • libcalico-go/lib/apis/v3/workloadendpoint.go
    • Line 20: warning: exported const KindWorkloadEndpoint should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: comment on exported type WorkloadEndpointSpec should be of the form "WorkloadEndpointSpec ..." (with optional leading article) (golint)
    • Line 79: warning: comment on exported type IPNAT should be of the form "IPNAT ..." (with optional leading article) (golint)
    • libcalico-go/lib/ipam/ipam_test.go
    • Line 1628: warning: don't use underscores in Go names; var pool4_v6 should be pool4V6 (golint)
    • Line 1629: warning: don't use underscores in Go names; var pool5_doesnot_exist should be pool5DoesnotExist (golint)
    • Line 1725: warning: don't use underscores in Go names; var pool4_v6 should be pool4V6 (golint)
    • Line 1726: warning: don't use underscores in Go names; var pool5_doesnot_exist should be pool5DoesnotExist (golint)
    • Line 1727: warning: don't use underscores in Go names; var pool_big_block_size should be poolBigBlockSize (golint)
    • Line 1817: warning: don't use underscores in Go names; var v4_again should be v4Again (golint)
    • libcalico-go/lib/ipam/pools.go
    • Line 3: warning: package comment should be of the form "Package ipam ..." (golint)
    • Line 18: warning: comment on exported type PoolAccessorInterface should be of the form "PoolAccessorInterface ..." (with optional leading article) (golint)
    • libcalico-go/lib/backend/model/workloadendpointstatus.go
    • Line 34: warning: exported type WorkloadEndpointStatusKey should have comment or be unexported (golint)
    • Line 102: warning: exported type WorkloadEndpointStatusListOptions should have comment or be unexported (golint)
    • Line 135: warning: exported method WorkloadEndpointStatusListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 176: warning: exported type WorkloadEndpointStatus should have comment or be unexported (golint)
    • libcalico-go/lib/client/bgppeer.go
    • Line 70: 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 111: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • libcalico-go/lib/client/config.go
    • Line 31: warning: exported type ConfigLocation should have comment or be unexported (golint)
    • Line 34: warning: exported const ConfigLocationNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported const GlobalDefaultASNumber should have comment (or a comment on this block) or be unexported (golint)
    • Line 180: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 396: 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)
    • libcalico-go/lib/backend/k8s/k8s_test.go
    • Line 217: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 246: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 268: warning: don't use underscores in Go names; func parameter type_ should be type (golint)
    • libcalico-go/lib/backend/model/statusreports.go
    • Line 34: warning: exported type ActiveStatusReportKey should have comment or be unexported (golint)
    • Line 69: warning: exported type ActiveStatusReportListOptions should have comment or be unexported (golint)
    • Line 87: warning: exported method ActiveStatusReportListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 107: warning: exported type LastStatusReportKey should have comment or be unexported (golint)
    • Line 142: warning: exported type LastStatusReportListOptions should have comment or be unexported (golint)
    • Line 160: warning: exported method LastStatusReportListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 180: warning: exported type StatusReport should have comment or be unexported (golint)
    • libcalico-go/lib/apis/v3/constants.go
    • Line 18: warning: comment on exported const Group should be of the form "Group ..." (golint)
    • Line 20: warning: exported const VersionCurrent should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: comment on exported const AllNamespaces should be of the form "AllNamespaces ..." (golint)
    • Line 31: warning: comment on exported const LabelNamespace should be of the form "LabelNamespace ..." (golint)
    • Line 35: warning: comment on exported const LabelServiceAccount should be of the form "LabelServiceAccount ..." (golint)
    • Line 39: warning: comment on exported const LabelOrchestrator should be of the form "LabelOrchestrator ..." (golint)
    • Line 43: warning: comment on exported const OrchestratorKubernetes should be of the form "OrchestratorKubernetes ..." (golint)
    • Line 49: warning: comment on exported const Enabled should be of the form "Enabled ..." (golint)
    • libcalico-go/lib/apis/v3/ippool.go
    • Line 25: warning: exported const KindIPPool should have comment (or a comment on this block) or be unexported (golint)
    • Line 92: warning: exported type VXLANMode should have comment or be unexported (golint)
    • Line 95: warning: exported const VXLANModeNever should have comment (or a comment on this block) or be unexported (golint)
    • Line 100: warning: exported type IPIPMode should have comment or be unexported (golint)
    • Line 103: warning: exported const IPIPModeNever should have comment (or a comment on this block) or be unexported (golint)
    • libcalico-go/lib/backend/model/bgpconfig.go
    • Line 34: warning: exported type GlobalBGPConfigKey should have comment or be unexported (golint)
    • Line 63: warning: exported type GlobalBGPConfigListOptions should have comment or be unexported (golint)
    • Line 76: warning: exported method GlobalBGPConfigListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 91: warning: exported type NodeBGPConfigKey should have comment or be unexported (golint)
    • Line 126: warning: exported type NodeBGPConfigListOptions should have comment or be unexported (golint)
    • Line 144: warning: exported method NodeBGPConfigListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • libcalico-go/lib/backend/model/rule.go
    • Line 27: warning: exported type Rule should have comment or be unexported (golint)
    • Line 87: warning: exported type HTTPMatch should have comment or be unexported (golint)
    • Line 92: warning: exported type RuleMetadata should have comment or be unexported (golint)
    • Line 109: warning: exported method Rule.AllSrcNets should have comment or be unexported (golint)
    • Line 113: warning: exported method Rule.AllDstNets should have comment or be unexported (golint)
    • Line 117: warning: exported method Rule.AllNotSrcNets should have comment or be unexported (golint)
    • Line 121: warning: exported method Rule.AllNotDstNets should have comment or be unexported (golint)
    • libcalico-go/lib/backend/etcd/etcd.go
    • Line 47: warning: exported type EtcdClient should have comment or be unexported (golint)
    • Line 52: warning: exported function NewEtcdClient should have comment or be unexported (golint)
    • Line 159: warning: exported method EtcdClient.Syncer should have comment or be unexported (golint)
    • Line 184: warning: comment on exported method EtcdClient.Apply should be of the form "Apply ..." (golint)
    • libcalico-go/lib/backend/k8s/resources/workloadendpoint.go
    • Line 41: warning: exported function NewWorkloadEndpointClient should have comment or be unexported (golint)
    • Line 48: warning: comment on exported type WorkloadEndpointClient should be of the form "WorkloadEndpointClient ..." (with optional leading article) (golint)
    • Line 54: warning: exported method WorkloadEndpointClient.Create should have comment or be unexported (golint)
    • Line 66: warning: exported method WorkloadEndpointClient.Update should have comment or be unexported (golint)
    • Line 74: warning: exported method WorkloadEndpointClient.DeleteKVP should have comment or be unexported (golint)
    • Line 78: warning: exported method WorkloadEndpointClient.Delete should have comment or be unexported (golint)
    • Line 173: warning: exported method WorkloadEndpointClient.Get should have comment or be unexported (golint)
    • Line 215: warning: exported method WorkloadEndpointClient.List should have comment or be unexported (golint)
    • Line 250: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 315: warning: exported method WorkloadEndpointClient.EnsureInitialized should have comment or be unexported (golint)
    • Line 319: warning: exported method WorkloadEndpointClient.Watch should have comment or be unexported (golint)
    • libcalico-go/lib/converter/profile.go
    • Line 40: warning: receiver name c should be consistent with previous receiver name p for ProfileConverter (golint)
    • Line 78: warning: receiver name c should be consistent with previous receiver name p for ProfileConverter (golint)
    • libcalico-go/lib/namespace/resource.go
    • Line 22: warning: comment on exported const KindKubernetesNetworkPolicy should be of the form "KindKubernetesNetworkPolicy ..." (golint)
    • Line 27: warning: exported function IsNamespaced should have comment or be unexported (golint)
    • libcalico-go/lib/backend/syncersv1/updateprocessors/processor.go
    • Line 37: warning: comment on exported type ConvertV2ToV1Key should be of the form "ConvertV2ToV1Key ..." (with optional leading article) (golint)
    • Line 40: warning: comment on exported type ConvertV2ToV1Value should be of the form "ConvertV2ToV1Value ..." (with optional leading article) (golint)
    • Line 46: warning: exported function NewSimpleUpdateProcessor should have comment or be unexported (golint)
    • libcalico-go/lib/upgrade/migrator/clients/v1/k8s/k8s.go
    • Line 40: warning: exported type KubeClient should have comment or be unexported (golint)
    • Line 54: warning: exported function NewKubeClient should have comment or be unexported (golint)
    • Line 118: warning: exported method KubeClient.IsKDD should have comment or be unexported (golint)
    • Line 214: warning: comment on exported method KubeClient.Apply should be of the form "Apply ..." (golint)
    • libcalico-go/lib/backend/model/bgppeer.go
    • Line 39: warning: exported type NodeBGPPeerKey should have comment or be unexported (golint)
    • Line 73: warning: exported type NodeBGPPeerListOptions should have comment or be unexported (golint)
    • Line 91: warning: exported method NodeBGPPeerListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 125: warning: exported type GlobalBGPPeerKey should have comment or be unexported (golint)
    • Line 155: warning: exported type GlobalBGPPeerListOptions should have comment or be unexported (golint)
    • Line 163: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 169: warning: exported method GlobalBGPPeerListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 198: warning: exported type BGPPeer should have comment or be unexported (golint)
    • Line 225: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • libcalico-go/lib/backend/model/ippool.go
    • Line 36: warning: exported type IPPoolKey should have comment or be unexported (golint)
    • Line 65: warning: exported type IPPoolListOptions should have comment or be unexported (golint)
    • Line 79: warning: exported method IPPoolListOptions.KeyFromDefaultPath should have comment or be unexported (golint)
    • Line 99: warning: exported type IPPool should have comment or be unexported (golint)
    • libcalico-go/lib/client/client.go
    • Line 140: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 145: warning: comment on exported function LoadClientConfigFromBytes should be of the form "LoadClientConfigFromBytes ..." (golint)
    • Line 175: warning: comment on exported function LoadClientConfigFromEnvironment should be of the form "LoadClientConfigFromEnvironment ..." (golint)
    • Line 333: 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)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign92%

IneffAssign detects ineffectual assignments in Go code.

    • libcalico-go/lib/clientv3/node_e2e_test.go
    • Line 374: warning: ineffectual assignment to err (ineffassign)
    • Line 379: warning: ineffectual assignment to err (ineffassign)
    • Line 383: warning: ineffectual assignment to err (ineffassign)
    • Line 387: warning: ineffectual assignment to err (ineffassign)
    • Line 389: warning: ineffectual assignment to err (ineffassign)
    • Line 674: warning: ineffectual assignment to err (ineffassign)
    • Line 685: warning: ineffectual assignment to err (ineffassign)
    • Line 788: warning: ineffectual assignment to err (ineffassign)

misspell98%

Misspell Finds commonly misspelled English words