Preparing report...

Report for kmodules.xyz/resource-metadata

A+    Excellent!    Found 60 issues across 119 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


gocyclo90%

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.


golint52%

Golint is a linter for Go source code.

    • /kmodules.xyz/resource-metadata/hub/kv.go
    • Line 33: warning: exported type KV should have comment or be unexported (golint)
    • Line 47: warning: exported method KVMap.Set should have comment or be unexported (golint)
    • Line 53: warning: exported method KVMap.Get should have comment or be unexported (golint)
    • Line 60: warning: exported method KVMap.Visit should have comment or be unexported (golint)
    • Line 76: warning: exported function NewKVLocal should have comment or be unexported (golint)
    • Line 83: warning: exported method KVLocal.Set should have comment or be unexported (golint)
    • Line 89: warning: exported method KVLocal.Get should have comment or be unexported (golint)
    • Line 98: warning: exported method KVLocal.Visit should have comment or be unexported (golint)
    • Line 105: warning: exported const KnownUID should have comment or be unexported (golint)
    • Line 108: warning: exported var KnownResources should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/pkg/registry/meta/pathfinder/storage.go
    • Line 32: warning: exported type Storage should have comment or be unexported (golint)
    • Line 39: warning: exported function NewStorage should have comment or be unexported (golint)
    • Line 43: warning: exported method Storage.GroupVersionKind should have comment or be unexported (golint)
    • Line 47: warning: exported method Storage.NamespaceScoped should have comment or be unexported (golint)
    • Line 51: warning: comment on exported method Storage.New should be of the form "New ..." (golint)
    • Line 56: warning: exported method Storage.Create should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/pkg/registry/meta/resourcedescriptor/storage.go
    • Line 38: warning: exported type Storage should have comment or be unexported (golint)
    • Line 47: warning: exported function NewStorage should have comment or be unexported (golint)
    • Line 56: warning: exported method Storage.GroupVersionKind should have comment or be unexported (golint)
    • Line 60: warning: exported method Storage.NamespaceScoped should have comment or be unexported (golint)
    • Line 64: warning: comment on exported method Storage.New should be of the form "New ..." (golint)
    • Line 69: warning: exported method Storage.Get should have comment or be unexported (golint)
    • Line 80: warning: comment on exported method Storage.NewList should be of the form "NewList ..." (golint)
    • Line 85: warning: exported method Storage.List should have comment or be unexported (golint)
    • Line 137: warning: exported method Storage.ConvertToTable should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/apis/meta/v1alpha1/resourcedescriptor_types.go
    • Line 25: warning: exported const ResourceKindResourceDescriptor should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: comment on exported type ResourceDescriptor should be of the form "ResourceDescriptor ..." (with optional leading article) (golint)
    • Line 48: warning: exported type ResourceDescriptorSpec should have comment or be unexported (golint)
    • Line 104: warning: exported type ResourceRequirements should have comment or be unexported (golint)
    • Line 115: warning: exported type RelatedResourcePage should have comment or be unexported (golint)
    • Line 120: warning: exported type ResourceSection should have comment or be unexported (golint)
    • Line 126: warning: exported type ResourceDisplayMode should have comment or be unexported (golint)
    • Line 129: warning: exported const DisplayModeList should have comment (or a comment on this block) or be unexported (golint)
    • Line 133: warning: exported type ResourceActions should have comment or be unexported (golint)
    • Line 137: warning: exported type ResourceAction should have comment or be unexported (golint)
    • Line 140: warning: exported const ActionNever should have comment (or a comment on this block) or be unexported (golint)
    • Line 145: warning: exported type StatusCodes should have comment or be unexported (golint)
    • Line 151: warning: exported type UIParameters should have comment or be unexported (golint)
    • Line 159: warning: exported type DeploymentParameters should have comment or be unexported (golint)
    • Line 188: warning: exported const ClusterScoped should have comment (or a comment on this block) or be unexported (golint)
    • Line 192: warning: exported type ConnectionType should have comment or be unexported (golint)
    • Line 195: warning: exported const MatchSelector should have comment (or a comment on this block) or be unexported (golint)
    • Line 201: warning: exported type ResourceConnection should have comment or be unexported (golint)
    • Line 206: warning: exported type ResourceConnectionSpec should have comment or be unexported (golint)
    • Line 241: warning: exported type OwnershipLevel should have comment or be unexported (golint)
    • Line 244: warning: exported const Reference should have comment (or a comment on this block) or be unexported (golint)
    • Line 249: warning: exported type Priority should have comment or be unexported (golint)
    • Line 252: warning: exported const Field should have comment (or a comment on this block) or be unexported (golint)
    • Line 283: warning: exported type ResourceSubTableDefinition should have comment or be unexported (golint)
    • Line 326: warning: exported type ResourceDescriptorList should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/pkg/tableconvertor/printers/rc_printer.go
    • Line 37: warning: exported type ReplicationControllerPrinter should have comment or be unexported (golint)
    • Line 41: warning: exported method ReplicationControllerPrinter.GVK should have comment or be unexported (golint)
    • Line 41: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 45: warning: exported method ReplicationControllerPrinter.Convert should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/apis/meta/v1alpha1/resourcedescriptor_helpers.go
    • Line 29: warning: exported method ResourceID.GroupVersion should have comment or be unexported (golint)
    • Line 33: warning: exported method ResourceID.GroupResource should have comment or be unexported (golint)
    • Line 37: warning: exported method ResourceID.TypeMeta should have comment or be unexported (golint)
    • Line 41: warning: exported method ResourceID.GroupVersionResource should have comment or be unexported (golint)
    • Line 45: warning: exported method ResourceID.GroupVersionKind should have comment or be unexported (golint)
    • Line 49: warning: exported method ResourceDescriptor.CustomResourceDefinition should have comment or be unexported (golint)
    • Line 53: warning: exported method ResourceDescriptor.IsValid should have comment or be unexported (golint)
    • Line 57: warning: exported function IsOfficialType should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/pkg/graph/lib.go
    • Line 43: warning: exported method Graph.List should have comment or be unexported (golint)
    • Line 54: warning: exported method Graph.ListUsingDijkstra should have comment or be unexported (golint)
    • Line 74: warning: exported method Graph.ListUsingDFS should have comment or be unexported (golint)
    • Line 124: warning: exported type ObjectFinder should have comment or be unexported (golint)
    • Line 129: warning: exported method ObjectFinder.List should have comment or be unexported (golint)
    • Line 151: warning: exported method ObjectFinder.ResourcesFor should have comment or be unexported (golint)
    • Line 691: warning: exported function IsOwnedBy should have comment or be unexported (golint)
    • Line 700: warning: comment on exported function Namespaces should be of the form "Namespaces ..." (golint)
    • Line 723: warning: exported function Extract should have comment or be unexported (golint)
    • Line 740: warning: exported function ExtractSelector should have comment or be unexported (golint)
    • Line 781: warning: exported function DecodeJSON should have comment or be unexported (golint)
    • Line 796: warning: exported function ExtractName should have comment or be unexported (golint)
    • Line 805: warning: exported function ParseResourceRefs should have comment or be unexported (golint)
    • Line 854: warning: exported method ObjectFinder.Get should have comment or be unexported (golint)
    • Line 891: warning: exported method ObjectFinder.Locate should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/pkg/registry/meta/graphfinder/storage.go
    • Line 32: warning: exported type Storage should have comment or be unexported (golint)
    • Line 39: warning: exported function NewStorage should have comment or be unexported (golint)
    • Line 43: warning: exported method Storage.GroupVersionKind should have comment or be unexported (golint)
    • Line 47: warning: exported method Storage.NamespaceScoped should have comment or be unexported (golint)
    • Line 51: warning: comment on exported method Storage.New should be of the form "New ..." (golint)
    • Line 56: warning: exported method Storage.Create should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/apis/meta/types.go
    • Line 24: warning: exported type ReferenceType should have comment or be unexported (golint)
    • Line 30: warning: exported type ResourceDescriptor should have comment or be unexported (golint)
    • Line 36: warning: exported type ResourceDescriptorSpec should have comment or be unexported (golint)
    • Line 57: warning: exported type ResourceRequirements should have comment or be unexported (golint)
    • Line 63: warning: exported type RelatedResourcePage should have comment or be unexported (golint)
    • Line 68: warning: exported type ResourceSection should have comment or be unexported (golint)
    • Line 74: warning: exported type ResourceDisplayMode should have comment or be unexported (golint)
    • Line 77: warning: exported const DisplayModeList should have comment (or a comment on this block) or be unexported (golint)
    • Line 81: warning: exported type ResourceActions should have comment or be unexported (golint)
    • Line 85: warning: exported type ResourceAction should have comment or be unexported (golint)
    • Line 88: warning: exported const ActionNever should have comment (or a comment on this block) or be unexported (golint)
    • Line 93: warning: exported type StatusCodes should have comment or be unexported (golint)
    • Line 99: warning: exported type UIParameters should have comment or be unexported (golint)
    • Line 105: warning: exported type DeploymentParameters should have comment or be unexported (golint)
    • Line 111: warning: exported type ChartRepoRef should have comment or be unexported (golint)
    • Line 117: warning: exported type ResourceID should have comment or be unexported (golint)
    • Line 125: warning: exported type ResourceScope should have comment or be unexported (golint)
    • Line 128: warning: exported const ClusterScoped should have comment (or a comment on this block) or be unexported (golint)
    • Line 132: warning: exported type ConnectionType should have comment or be unexported (golint)
    • Line 135: warning: exported const MatchSelector should have comment (or a comment on this block) or be unexported (golint)
    • Line 141: warning: exported type ResourceConnection should have comment or be unexported (golint)
    • Line 146: warning: exported type ResourceConnectionSpec should have comment or be unexported (golint)
    • Line 157: warning: exported type OwnershipLevel should have comment or be unexported (golint)
    • Line 160: warning: exported const Reference should have comment (or a comment on this block) or be unexported (golint)
    • Line 186: warning: exported type ResourceSubTableDefinition should have comment or be unexported (golint)
    • Line 192: warning: exported type ImageSpec should have comment or be unexported (golint)
    • Line 198: warning: exported type ContactData should have comment or be unexported (golint)
    • Line 204: warning: exported type Link should have comment or be unexported (golint)
    • Line 219: warning: exported type GroupResources should have comment or be unexported (golint)
    • Line 224: warning: exported type GroupVersionResource should have comment or be unexported (golint)
    • Line 230: warning: comment on exported type PathFinder should be of the form "PathFinder ..." (with optional leading article) (golint)
    • Line 237: warning: exported type PathRequest should have comment or be unexported (golint)
    • Line 242: warning: exported type PathResponse should have comment or be unexported (golint)
    • Line 246: warning: exported type Path should have comment or be unexported (golint)
    • Line 253: warning: exported type Edge should have comment or be unexported (golint)
    • Line 261: warning: comment on exported type GraphFinder should be of the form "GraphFinder ..." (with optional leading article) (golint)
    • Line 268: warning: exported type GraphRequest should have comment or be unexported (golint)
    • Line 272: warning: exported type GraphResponse should have comment or be unexported (golint)
    • Line 277: warning: exported type Table should have comment or be unexported (golint)
    • Line 286: warning: exported type SubTable should have comment or be unexported (golint)
    • Line 292: warning: exported type TableRow should have comment or be unexported (golint)
    • Line 296: warning: exported type IncludeObjectPolicy should have comment or be unexported (golint)
    • Line 299: warning: exported const IncludeNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 304: warning: exported type TableOptions should have comment or be unexported (golint)
    • Line 310: warning: comment on exported type ResourceClass should be of the form "ResourceClass ..." (with optional leading article) (golint)
    • Line 319: warning: exported type ResourceClassSpec should have comment or be unexported (golint)
    • Line 325: warning: exported type ResourceClassInfo should have comment or be unexported (golint)
    • Line 332: warning: exported type Entry should have comment or be unexported (golint)
    • Line 340: warning: comment on exported type ResourceClassList should be of the form "ResourceClassList ..." (with optional leading article) (golint)
    • /kmodules.xyz/resource-metadata/cmd/resource-graph-tester/main.go
    • Line 72: warning: don't use underscores in Go names; func main_list should be mainList (golint)
    • Line 99: warning: exported function CheckNodeToPod should have comment or be unexported (golint)
    • Line 127: warning: exported function CheckPodToNode should have comment or be unexported (golint)
    • Line 155: warning: exported function CheckDeployment should have comment or be unexported (golint)
    • Line 358: warning: exported function CheckBackupConfigToAppBinding should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/apis/meta/v1alpha1/pathfinder_types.go
    • Line 25: warning: exported const ResourceKindPathFinder should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported type PathFinder should have comment or be unexported (golint)
    • Line 45: warning: exported type PathRequest should have comment or be unexported (golint)
    • Line 50: warning: exported type PathResponse should have comment or be unexported (golint)
    • Line 54: warning: exported type Path should have comment or be unexported (golint)
    • Line 61: warning: exported type Edge should have comment or be unexported (golint)
    • Line 69: warning: exported type GroupResources should have comment or be unexported (golint)
    • Line 81: warning: exported method GroupVersionResource.GVR should have comment or be unexported (golint)
    • Line 89: warning: exported function FromGVR should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/apis/meta/v1alpha1/resourceclass_types.go
    • Line 24: warning: exported const ResourceKindResourceClass should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: comment on exported type ResourceClass should be of the form "ResourceClass ..." (with optional leading article) (golint)
    • Line 47: warning: exported type ResourceClassSpec should have comment or be unexported (golint)
    • Line 53: warning: exported type ResourceClassInfo should have comment or be unexported (golint)
    • Line 68: warning: exported type Entry should have comment or be unexported (golint)
    • Line 82: warning: exported type ResourceClassList should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/hub/registry.go
    • Line 48: warning: exported type HelmVersion should have comment or be unexported (golint)
    • Line 51: warning: exported const HelmUnused should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: exported type Registry should have comment or be unexported (golint)
    • Line 74: warning: exported function NewRegistry should have comment or be unexported (golint)
    • Line 104: warning: exported function NewRegistryOfKnownResources should have comment or be unexported (golint)
    • Line 108: warning: exported method Registry.DiscoverResources should have comment or be unexported (golint)
    • Line 129: warning: exported method Registry.Refresh should have comment or be unexported (golint)
    • Line 136: warning: exported function DiscoverHelm should have comment or be unexported (golint)
    • Line 155: warning: exported method Registry.SetHelmVersion should have comment or be unexported (golint)
    • Line 159: warning: exported method Registry.Register should have comment or be unexported (golint)
    • Line 279: warning: exported method Registry.Visit should have comment or be unexported (golint)
    • Line 288: warning: exported method Registry.Missing should have comment or be unexported (golint)
    • Line 316: warning: exported method Registry.GVR should have comment or be unexported (golint)
    • Line 326: warning: exported method Registry.TypeMeta should have comment or be unexported (golint)
    • Line 336: warning: exported method Registry.GVK should have comment or be unexported (golint)
    • Line 346: warning: exported method Registry.IsNamespaced should have comment or be unexported (golint)
    • Line 356: warning: exported method Registry.IsPreferred should have comment or be unexported (golint)
    • Line 365: warning: exported method Registry.Preferred should have comment or be unexported (golint)
    • Line 374: warning: exported method Registry.ExistsGVR should have comment or be unexported (golint)
    • Line 384: warning: exported method Registry.ExistsGVK should have comment or be unexported (golint)
    • Line 394: warning: exported method Registry.Resources should have comment or be unexported (golint)
    • Line 405: warning: exported method Registry.LoadByGVR should have comment or be unexported (golint)
    • Line 416: warning: exported method Registry.LoadByName should have comment or be unexported (golint)
    • Line 421: warning: exported method Registry.LoadByFile should have comment or be unexported (golint)
    • Line 429: warning: exported method Registry.CompleteResourcePanel should have comment or be unexported (golint)
    • Line 433: warning: exported method Registry.DefaultResourcePanel should have comment or be unexported (golint)
    • Line 580: warning: exported type UnregisteredErr should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/pkg/graph/types.go
    • Line 33: warning: exported const MetadataNamespace should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported type Edge should have comment or be unexported (golint)
    • Line 47: warning: exported type AdjacencyMap should have comment or be unexported (golint)
    • Line 49: warning: exported type Graph should have comment or be unexported (golint)
    • Line 54: warning: exported function NewGraph should have comment or be unexported (golint)
    • Line 61: warning: exported method Graph.AddEdge should have comment or be unexported (golint)
    • Line 82: warning: comment on exported type NamespaceSelector should be of the form "NamespaceSelector ..." (with optional leading article) (golint)
    • /kmodules.xyz/resource-metadata/pkg/tableconvertor/printers/service_printer.go
    • Line 38: warning: exported type ServicePrinter should have comment or be unexported (golint)
    • Line 42: warning: exported method ServicePrinter.GVK should have comment or be unexported (golint)
    • Line 42: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 46: warning: exported method ServicePrinter.Convert should have comment or be unexported (golint)
    • Line 135: warning: exported function MakeServicePortString should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/hub/pool.go
    • Line 25: warning: exported type Pool should have comment or be unexported (golint)
    • Line 31: warning: exported const PoolSize should have comment or be unexported (golint)
    • Line 33: warning: exported function NewPool should have comment or be unexported (golint)
    • Line 41: warning: exported function MustPool should have comment or be unexported (golint)
    • Line 49: warning: exported method Pool.GetRegistry should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/pkg/graph/heap.go
    • Line 17: warning: package comment should be of the form "Package graph ..." (golint)
    • Line 50: warning: exported method Queue.Push should have comment or be unexported (golint)
    • Line 57: warning: exported method Queue.Pop should have comment or be unexported (golint)
    • Line 74: warning: exported function Dijkstra should have comment or be unexported (golint)
    • Line 118: warning: exported type Path should have comment or be unexported (golint)
    • Line 130: warning: exported function GeneratePaths should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/hub/resourceclasses/lib.go
    • Line 34: warning: exported function FS should have comment or be unexported (golint)
    • Line 38: warning: exported function ResourceClassName should have comment or be unexported (golint)
    • Line 64: warning: exported function LoadByGVR should have comment or be unexported (golint)
    • Line 69: warning: exported function LoadByName should have comment or be unexported (golint)
    • Line 74: warning: exported function LoadByFile should have comment or be unexported (golint)
    • /kmodules.xyz/resource-metadata/pkg/tableconvertor/printers/printers.go
    • Line 25: warning: comment on exported const NodeUnreachablePodReason should be of the form "NodeUnreachablePodReason ..." (golint)
    • Line 27: warning: exported const None should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported type ColumnConverter should have comment or be unexported (golint)
    • Line 37: warning: exported function Register should have comment or be unexported (golint)
    • Line 41: warning: exported function Convert should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!