Preparing report...

Report for github.com/vmware-tanzu-labs/operator-builder

A+    Excellent!    Found 65 issues across 104 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!


gocyclo97%

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.


golint38%

Golint is a linter for Go source code.

    • operator-builder/internal/plugins/workload/v1/plugin.go
    • Line 28: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 33: warning: exported method Plugin.Name should have comment or be unexported (golint)
    • Line 34: warning: exported method Plugin.Version should have comment or be unexported (golint)
    • Line 35: warning: exported method Plugin.SupportedProjectVersions should have comment or be unexported (golint)
    • Line 37: warning: comment on exported method Plugin.GetInitSubcommand should be of the form "GetInitSubcommand ..." (golint)
    • Line 40: warning: comment on exported method Plugin.GetCreateAPISubcommand should be of the form "GetCreateAPISubcommand ..." (golint)
    • operator-builder/internal/markers/lexer/lexeme.go
    • Line 6: warning: exported type LexemeType should have comment or be unexported (golint)
    • Line 9: warning: exported const LexemeError should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type Lexeme should have comment or be unexported (golint)
    • operator-builder/internal/plugins/config/v1/plugin.go
    • Line 28: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 33: warning: exported method Plugin.Name should have comment or be unexported (golint)
    • Line 34: warning: exported method Plugin.Version should have comment or be unexported (golint)
    • Line 35: warning: exported method Plugin.SupportedProjectVersions should have comment or be unexported (golint)
    • Line 36: warning: exported method Plugin.GetInitSubcommand should have comment or be unexported (golint)
    • Line 37: warning: exported method Plugin.GetCreateAPISubcommand should have comment or be unexported (golint)
    • operator-builder/internal/markers/marker/registry.go
    • Line 8: warning: exported type Registry should have comment or be unexported (golint)
    • Line 13: warning: exported function NewRegistry should have comment or be unexported (golint)
    • Line 20: warning: exported method Registry.Add should have comment or be unexported (golint)
    • Line 24: warning: exported method Registry.Lookup should have comment or be unexported (golint)
    • Line 30: warning: exported method Registry.GetDefinition should have comment or be unexported (golint)
    • operator-builder/internal/workload/v1/component.go
    • Line 19: warning: exported var ErrNoComponentsOnComponent should have comment or be unexported (golint)
    • Line 21: warning: exported method ComponentWorkload.Validate should have comment or be unexported (golint)
    • Line 48: warning: exported method ComponentWorkload.GetWorkloadKind should have comment or be unexported (golint)
    • Line 52: warning: comment on exported method ComponentWorkload.GetDomain should be of the form "GetDomain ..." (golint)
    • Line 57: warning: exported method ComponentWorkload.GetName should have comment or be unexported (golint)
    • Line 61: warning: exported method ComponentWorkload.GetPackageName should have comment or be unexported (golint)
    • Line 65: warning: exported method ComponentWorkload.GetAPIGroup should have comment or be unexported (golint)
    • Line 69: warning: exported method ComponentWorkload.GetAPIVersion should have comment or be unexported (golint)
    • Line 73: warning: exported method ComponentWorkload.GetAPIKind should have comment or be unexported (golint)
    • Line 77: warning: exported method ComponentWorkload.GetSubcommandName should have comment or be unexported (golint)
    • Line 81: warning: exported method ComponentWorkload.GetSubcommandDescr should have comment or be unexported (golint)
    • Line 85: warning: exported method ComponentWorkload.GetSubcommandVarName should have comment or be unexported (golint)
    • Line 89: warning: exported method ComponentWorkload.GetSubcommandFileName should have comment or be unexported (golint)
    • Line 93: warning: exported method ComponentWorkload.GetRootcommandName should have comment or be unexported (golint)
    • Line 98: warning: exported method ComponentWorkload.GetRootcommandVarName should have comment or be unexported (golint)
    • Line 103: warning: exported method ComponentWorkload.IsClusterScoped should have comment or be unexported (golint)
    • Line 107: warning: exported method ComponentWorkload.IsStandalone should have comment or be unexported (golint)
    • Line 111: warning: exported method ComponentWorkload.IsComponent should have comment or be unexported (golint)
    • Line 115: warning: exported method ComponentWorkload.IsCollection should have comment or be unexported (golint)
    • Line 119: warning: exported method ComponentWorkload.SetResources should have comment or be unexported (golint)
    • Line 133: warning: exported method ComponentWorkload.GetDependencies should have comment or be unexported (golint)
    • Line 137: warning: exported method ComponentWorkload.SetComponents should have comment or be unexported (golint)
    • Line 141: warning: exported method ComponentWorkload.HasChildResources should have comment or be unexported (golint)
    • Line 145: warning: exported method ComponentWorkload.GetComponents should have comment or be unexported (golint)
    • Line 149: warning: exported method ComponentWorkload.GetSourceFiles should have comment or be unexported (golint)
    • Line 153: warning: exported method ComponentWorkload.GetFuncNames should have comment or be unexported (golint)
    • Line 157: warning: exported method ComponentWorkload.GetAPISpecFields should have comment or be unexported (golint)
    • Line 161: warning: exported method ComponentWorkload.GetRBACRules should have comment or be unexported (golint)
    • Line 165: warning: exported method ComponentWorkload.GetOwnershipRules should have comment or be unexported (golint)
    • Line 169: warning: exported method ComponentWorkload.GetComponentResource should have comment or be unexported (golint)
    • Line 201: warning: exported method ComponentWorkload.HasSubCmdName should have comment or be unexported (golint)
    • Line 205: warning: exported method ComponentWorkload.HasSubCmdDescription should have comment or be unexported (golint)
    • Line 209: warning: exported method ComponentWorkload.SetNames should have comment or be unexported (golint)
    • Line 219: warning: exported method ComponentWorkload.GetSubcommands should have comment or be unexported (golint)
    • operator-builder/internal/plugins/license/v1/plugin.go
    • Line 28: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 32: warning: exported method Plugin.Name should have comment or be unexported (golint)
    • Line 33: warning: exported method Plugin.Version should have comment or be unexported (golint)
    • Line 34: warning: exported method Plugin.SupportedProjectVersions should have comment or be unexported (golint)
    • Line 35: warning: exported method Plugin.GetInitSubcommand should have comment or be unexported (golint)
    • operator-builder/internal/markers/marker/marker.go
    • Line 13: warning: exported var ErrTypeMustBeStruct should have comment or be unexported (golint)
    • Line 18: warning: exported type Definition should have comment or be unexported (golint)
    • Line 28: warning: exported function Define should have comment or be unexported (golint)
    • Line 41: warning: exported method Definition.GetName should have comment or be unexported (golint)
    • Line 45: warning: exported method Definition.LookupArgument should have comment or be unexported (golint)
    • Line 51: warning: exported method Definition.SetArgument should have comment or be unexported (golint)
    • Line 65: warning: exported method Definition.InflateObject should have comment or be unexported (golint)
    • operator-builder/internal/markers/marker/argument.go
    • Line 16: warning: exported var ErrWrongType should have comment or be unexported (golint)
    • Line 46: warning: exported function ArgumentFromField should have comment or be unexported (golint)
    • Line 74: warning: comment on exported method Argument.SetTypeInfo should be of the form "SetTypeInfo ..." (golint)
    • Line 91: warning: exported method Argument.SetValue should have comment or be unexported (golint)
    • Line 129: warning: exported method Argument.InitializeValue should have comment or be unexported (golint)
    • operator-builder/internal/plugins/workload/v1/scaffolds/templates/int/resources/resources.go
    • Line 22: warning: comment on exported type Resources should be of the form "Resources ..." (with optional leading article) (golint)
    • Line 24: warning: exported type NamespaceType should have comment or be unexported (golint)
    • Line 25: warning: exported type CustomResourceDefinitionType should have comment or be unexported (golint)
    • Line 26: warning: exported type SecretType should have comment or be unexported (golint)
    • Line 27: warning: exported type ConfigMapType should have comment or be unexported (golint)
    • Line 28: warning: exported type DeploymentType should have comment or be unexported (golint)
    • Line 29: warning: exported type DaemonSetType should have comment or be unexported (golint)
    • Line 30: warning: exported type StatefulSetType should have comment or be unexported (golint)
    • Line 31: warning: exported type JobType should have comment or be unexported (golint)
    • Line 32: warning: exported type ServiceType should have comment or be unexported (golint)
    • Line 34: warning: exported method ResourceType.SetTemplateDefaults should have comment or be unexported (golint)
    • Line 46: warning: exported method Resources.SetTemplateDefaults should have comment or be unexported (golint)
    • Line 58: warning: exported method NamespaceType.SetTemplateDefaults should have comment or be unexported (golint)
    • Line 70: warning: exported method ConfigMapType.SetTemplateDefaults should have comment or be unexported (golint)
    • Line 82: warning: exported method CustomResourceDefinitionType.SetTemplateDefaults should have comment or be unexported (golint)
    • Line 94: warning: exported method DaemonSetType.SetTemplateDefaults should have comment or be unexported (golint)
    • Line 106: warning: exported method DeploymentType.SetTemplateDefaults should have comment or be unexported (golint)
    • Line 118: warning: exported method JobType.SetTemplateDefaults should have comment or be unexported (golint)
    • Line 130: warning: exported method SecretType.SetTemplateDefaults should have comment or be unexported (golint)
    • Line 142: warning: exported method ServiceType.SetTemplateDefaults should have comment or be unexported (golint)
    • Line 154: warning: exported method StatefulSetType.SetTemplateDefaults should have comment or be unexported (golint)
    • operator-builder/internal/plugins/workload/v1/scaffolds/templates/main.go
    • Line 30: warning: exported method Main.SetTemplateDefaults should have comment or be unexported (golint)
    • Line 46: warning: exported type MainUpdater should have comment or be unexported (golint)
    • Line 55: warning: exported method MainUpdater.GetPath should have comment or be unexported (golint)
    • Line 59: warning: exported method MainUpdater.GetIfExistsAction should have comment or be unexported (golint)
    • Line 63: warning: exported method MainUpdater.GetMarkers should have comment or be unexported (golint)
    • Line 102: warning: exported method MainUpdater.GetCodeFragments should have comment or be unexported (golint)
    • operator-builder/internal/workload/v1/collection.go
    • Line 21: warning: exported var ErrMissingRequiredFields should have comment or be unexported (golint)
    • Line 23: warning: exported method WorkloadCollection.Validate should have comment or be unexported (golint)
    • Line 54: warning: exported method WorkloadCollection.GetWorkloadKind should have comment or be unexported (golint)
    • Line 58: warning: comment on exported method WorkloadCollection.GetDomain should be of the form "GetDomain ..." (golint)
    • Line 63: warning: exported method WorkloadCollection.HasRootCmdName should have comment or be unexported (golint)
    • Line 67: warning: exported method WorkloadCollection.HasRootCmdDescription should have comment or be unexported (golint)
    • Line 71: warning: exported method WorkloadCollection.HasSubCmdName should have comment or be unexported (golint)
    • Line 75: warning: exported method WorkloadCollection.HasSubCmdDescription should have comment or be unexported (golint)
    • Line 79: warning: exported method WorkloadCollection.GetRootCmdName should have comment or be unexported (golint)
    • Line 83: warning: exported method WorkloadCollection.GetRootCmdDescr should have comment or be unexported (golint)
    • Line 87: warning: comment on exported method WorkloadCollection.GetName should be of the form "GetName ..." (golint)
    • Line 92: warning: exported method WorkloadCollection.GetPackageName should have comment or be unexported (golint)
    • Line 96: warning: exported method WorkloadCollection.GetAPIGroup should have comment or be unexported (golint)
    • Line 100: warning: exported method WorkloadCollection.GetAPIVersion should have comment or be unexported (golint)
    • Line 104: warning: exported method WorkloadCollection.GetAPIKind should have comment or be unexported (golint)
    • Line 108: warning: exported method WorkloadCollection.GetSubcommandName should have comment or be unexported (golint)
    • Line 112: warning: exported method WorkloadCollection.GetSubcommandDescr should have comment or be unexported (golint)
    • Line 116: warning: exported method WorkloadCollection.GetSubcommandVarName should have comment or be unexported (golint)
    • Line 120: warning: exported method WorkloadCollection.GetSubcommandFileName should have comment or be unexported (golint)
    • Line 124: warning: exported method WorkloadCollection.GetRootcommandName should have comment or be unexported (golint)
    • Line 128: warning: exported method WorkloadCollection.GetRootcommandVarName should have comment or be unexported (golint)
    • Line 132: warning: exported method WorkloadCollection.IsClusterScoped should have comment or be unexported (golint)
    • Line 136: warning: exported method WorkloadCollection.IsStandalone should have comment or be unexported (golint)
    • Line 140: warning: exported method WorkloadCollection.IsComponent should have comment or be unexported (golint)
    • Line 144: warning: exported method WorkloadCollection.IsCollection should have comment or be unexported (golint)
    • Line 148: warning: exported method WorkloadCollection.SetResources should have comment or be unexported (golint)
    • Line 196: warning: exported method WorkloadCollection.GetDependencies should have comment or be unexported (golint)
    • Line 200: warning: exported method WorkloadCollection.SetComponents should have comment or be unexported (golint)
    • Line 206: warning: exported method WorkloadCollection.HasChildResources should have comment or be unexported (golint)
    • Line 210: warning: exported method WorkloadCollection.GetComponents should have comment or be unexported (golint)
    • Line 214: warning: exported method WorkloadCollection.GetSourceFiles should have comment or be unexported (golint)
    • Line 218: warning: exported method WorkloadCollection.GetFuncNames should have comment or be unexported (golint)
    • Line 222: warning: exported method WorkloadCollection.GetAPISpecFields should have comment or be unexported (golint)
    • Line 226: warning: exported method WorkloadCollection.GetRBACRules should have comment or be unexported (golint)
    • Line 230: warning: exported method WorkloadCollection.GetOwnershipRules should have comment or be unexported (golint)
    • Line 234: warning: exported method WorkloadCollection.GetComponentResource should have comment or be unexported (golint)
    • Line 266: warning: exported method WorkloadCollection.SetNames should have comment or be unexported (golint)
    • Line 293: warning: exported method WorkloadCollection.GetSubcommands should have comment or be unexported (golint)
    • operator-builder/internal/workload/v1/config.go
    • Line 18: warning: exported var ErrNamesMustBeUnique should have comment or be unexported (golint)
    • Line 27: warning: exported function ProcessInitConfig should have comment or be unexported (golint)
    • Line 57: warning: comment on exported function ProcessAPIConfig should be of the form "ProcessAPIConfig ..." (golint)
    • operator-builder/internal/markers/parser/parser.go
    • Line 14: warning: exported type Parser should have comment or be unexported (golint)
    • Line 28: warning: exported function NewParser should have comment or be unexported (golint)
    • Line 52: warning: exported method Parser.Run should have comment or be unexported (golint)
    • Line 59: warning: exported method Parser.NextItem should have comment or be unexported (golint)
    • Line 63: warning: exported method Parser.Parse should have comment or be unexported (golint)
    • operator-builder/internal/workload/v1/markers.go
    • Line 27: warning: exported var ErrUnsupportedDataType should have comment or be unexported (golint)
    • Line 336: warning: exported function InitializeMarkerInspector should have comment or be unexported (golint)
    • Line 355: warning: exported function TransformYAML should have comment or be unexported (golint)
    • Line 407: warning: exported type FieldType should have comment or be unexported (golint)
    • Line 410: warning: exported const FieldUnknownType should have comment (or a comment on this block) or be unexported (golint)
    • Line 416: warning: exported method FieldType.UnmarshalMarkerArg should have comment or be unexported (golint)
    • Line 448: warning: exported type FieldMarker should have comment or be unexported (golint)
    • Line 456: warning: exported type CollectionFieldMarker should have comment or be unexported (golint)
    • operator-builder/internal/workload/v1/standalone.go
    • Line 19: warning: exported var ErrNoComponentsOnStandalone should have comment or be unexported (golint)
    • Line 21: warning: exported method StandaloneWorkload.Validate should have comment or be unexported (golint)
    • Line 52: warning: exported method StandaloneWorkload.GetWorkloadKind should have comment or be unexported (golint)
    • Line 56: warning: comment on exported method StandaloneWorkload.GetDomain should be of the form "GetDomain ..." (golint)
    • Line 61: warning: exported method StandaloneWorkload.HasRootCmdName should have comment or be unexported (golint)
    • Line 65: warning: exported method StandaloneWorkload.HasRootCmdDescription should have comment or be unexported (golint)
    • Line 69: warning: exported method StandaloneWorkload.HasSubCmdName should have comment or be unexported (golint)
    • Line 74: warning: exported method StandaloneWorkload.GetRootCmdName should have comment or be unexported (golint)
    • Line 78: warning: exported method StandaloneWorkload.GetRootCmdDescr should have comment or be unexported (golint)
    • Line 82: warning: comment on exported method StandaloneWorkload.GetName should be of the form "GetName ..." (golint)
    • Line 87: warning: exported method StandaloneWorkload.GetPackageName should have comment or be unexported (golint)
    • Line 91: warning: exported method StandaloneWorkload.GetAPIGroup should have comment or be unexported (golint)
    • Line 95: warning: exported method StandaloneWorkload.GetAPIVersion should have comment or be unexported (golint)
    • Line 99: warning: exported method StandaloneWorkload.GetAPIKind should have comment or be unexported (golint)
    • Line 103: warning: exported method StandaloneWorkload.GetSubcommandName should have comment or be unexported (golint)
    • Line 108: warning: exported method StandaloneWorkload.GetSubcommandDescr should have comment or be unexported (golint)
    • Line 113: warning: exported method StandaloneWorkload.GetSubcommandVarName should have comment or be unexported (golint)
    • Line 118: warning: exported method StandaloneWorkload.GetSubcommandFileName should have comment or be unexported (golint)
    • Line 123: warning: exported method StandaloneWorkload.GetRootcommandName should have comment or be unexported (golint)
    • Line 127: warning: exported method StandaloneWorkload.GetRootcommandVarName should have comment or be unexported (golint)
    • Line 131: warning: exported method StandaloneWorkload.IsClusterScoped should have comment or be unexported (golint)
    • Line 135: warning: exported method StandaloneWorkload.IsStandalone should have comment or be unexported (golint)
    • Line 139: warning: exported method StandaloneWorkload.IsComponent should have comment or be unexported (golint)
    • Line 143: warning: exported method StandaloneWorkload.IsCollection should have comment or be unexported (golint)
    • Line 147: warning: exported method StandaloneWorkload.SetResources should have comment or be unexported (golint)
    • Line 161: warning: exported method StandaloneWorkload.GetDependencies should have comment or be unexported (golint)
    • Line 165: warning: exported method StandaloneWorkload.SetComponents should have comment or be unexported (golint)
    • Line 169: warning: exported method StandaloneWorkload.HasChildResources should have comment or be unexported (golint)
    • Line 173: warning: exported method StandaloneWorkload.GetComponents should have comment or be unexported (golint)
    • Line 177: warning: exported method StandaloneWorkload.GetSourceFiles should have comment or be unexported (golint)
    • Line 181: warning: exported method StandaloneWorkload.GetFuncNames should have comment or be unexported (golint)
    • Line 185: warning: exported method StandaloneWorkload.GetAPISpecFields should have comment or be unexported (golint)
    • Line 189: warning: exported method StandaloneWorkload.GetRBACRules should have comment or be unexported (golint)
    • Line 193: warning: exported method StandaloneWorkload.GetOwnershipRules should have comment or be unexported (golint)
    • Line 197: warning: exported method StandaloneWorkload.GetComponentResource should have comment or be unexported (golint)
    • Line 201: warning: exported method StandaloneWorkload.SetNames should have comment or be unexported (golint)
    • Line 218: warning: exported method StandaloneWorkload.GetSubcommands should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!