Preparing report...

Report for github.com/weaveworks/cluster-api-provider-existinginfra

A+    Excellent!    Found 35 issues across 103 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!


gocyclo94%

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.


golint69%

Golint is a linter for Go source code.

    • cluster-api-provider-existinginfra/apis/baremetalproviderspec/v1alpha1/clusterspec_types.go
    • Line 52: warning: exported type OSConfig should have comment or be unexported (golint)
    • Line 56: warning: exported type FileSpec should have comment or be unexported (golint)
    • Line 61: warning: exported type SourceSpec should have comment or be unexported (golint)
    • Line 66: warning: exported type ContainerRuntime should have comment or be unexported (golint)
    • Line 72: warning: exported type APIServer should have comment or be unexported (golint)
    • Line 78: warning: exported type ServerArgument should have comment or be unexported (golint)
    • Line 83: warning: exported type AuthenticationWebhook should have comment or be unexported (golint)
    • Line 89: warning: exported type AuthorizationWebhook should have comment or be unexported (golint)
    • cluster-api-provider-existinginfra/pkg/plan/resource/deb.go
    • Line 23: warning: exported method Deb.State should have comment or be unexported (golint)
    • Line 27: warning: exported method Deb.QueryState should have comment or be unexported (golint)
    • Line 42: warning: exported method Deb.Apply should have comment or be unexported (golint)
    • Line 55: warning: exported method Deb.Undo should have comment or be unexported (golint)
    • Line 63: warning: exported function DebResourceFromPackage should have comment or be unexported (golint)
    • cluster-api-provider-existinginfra/apis/cluster.weave.works/v1alpha3/existinginfracluster_types.go
    • Line 95: warning: exported type OSConfig should have comment or be unexported (golint)
    • Line 99: warning: exported type FileSpec should have comment or be unexported (golint)
    • Line 104: warning: exported type SourceSpec should have comment or be unexported (golint)
    • Line 110: warning: exported type ContainerRuntime should have comment or be unexported (golint)
    • Line 116: warning: exported type APIServer should have comment or be unexported (golint)
    • Line 121: warning: exported type ServerArgument should have comment or be unexported (golint)
    • Line 126: warning: exported type AuthenticationWebhook should have comment or be unexported (golint)
    • Line 132: warning: exported type AuthorizationWebhook should have comment or be unexported (golint)
    • cluster-api-provider-existinginfra/pkg/utilities/envcfg/environment_config.go
    • Line 12: warning: exported type EnvSpecificConfig should have comment or be unexported (golint)
    • Line 25: warning: don't use underscores in Go names; const FC_bridge_nf_call_iptables should be FCBridgeNfCallIptables (golint)
    • Line 25: warning: exported const FC_bridge_nf_call_iptables should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported function GetEnvSpecificConfig should have comment or be unexported (golint)
    • cluster-api-provider-existinginfra/pkg/plan/plan.go
    • Line 44: warning: exported type RunError should have comment or be unexported (golint)
    • Line 80: warning: exported const Valid should have comment (or a comment on this block) or be unexported (golint)
    • Line 89: warning: exported const None should have comment (or a comment on this block) or be unexported (golint)
    • Line 254: warning: exported method ValidityTree.ObservedErrorString should have comment or be unexported (golint)
    • Line 300: warning: exported method Plan.GetResource should have comment or be unexported (golint)
    • Line 720: warning: exported method Plan.ApplyResourceGraph should have comment or be unexported (golint)
    • Line 1035: warning: exported function ParamString should have comment or be unexported (golint)
    • cluster-api-provider-existinginfra/pkg/apis/wksprovider/machine/os/os.go
    • Line 80: warning: exported type CRDFile should have comment or be unexported (golint)
    • Line 85: warning: comment on exported function GetCRDs should be of the form "GetCRDs ..." (golint)
    • Line 491: warning: exported function CreateClusterConfigMap should have comment or be unexported (golint)
    • Line 505: warning: exported function CreateAssetConfigMap should have comment or be unexported (golint)
    • Line 572: warning: exported function ApplyPlan should have comment or be unexported (golint)
    • Line 615: warning: exported function WksControllerManifest should have comment or be unexported (golint)
    • Line 641: warning: comment on exported function UpdateControllerImage should be of the form "UpdateControllerImage ..." (golint)
    • Line 689: warning: comment on exported function SetWeaveNetPodCIDRBlock should be of the form "SetWeaveNetPodCIDRBlock ..." (golint)
    • Line 726: warning: comment on exported function InjectEnvVarToContainer should be of the form "InjectEnvVarToContainer ..." (golint)
    • Line 762: warning: comment on exported function FindDaemonSet should be of the form "FindDaemonSet ..." (golint)
    • Line 788: warning: exported function CreateConfigFileResourcesFromConfigMaps should have comment or be unexported (golint)
    • Line 814: warning: exported function CreateConfigFileResourcesFromFileSpecs should have comment or be unexported (golint)
    • Line 986: warning: exported const CentOS should have comment (or a comment on this block) or be unexported (golint)
    • Line 1039: warning: exported type SecretResourceSpec should have comment or be unexported (golint)
    • Line 1045: warning: exported function StoreIfNotEmpty should have comment or be unexported (golint)
    • Line 1051: warning: exported function GetAPIServerArgs should have comment or be unexported (golint)
    • Line 1060: warning: exported function AddClusterAPICRDs should have comment or be unexported (golint)
    • Line 1120: warning: exported function ConfigureFlux should have comment or be unexported (golint)
    • cluster-api-provider-existinginfra/pkg/plan/resource/os.go
    • Line 22: warning: exported type SELinuxStatus should have comment or be unexported (golint)
    • Line 25: warning: exported const SELinuxUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported method SELinuxStatus.IsUnknown should have comment or be unexported (golint)
    • Line 34: warning: exported method SELinuxStatus.IsNotInstalled should have comment or be unexported (golint)
    • Line 38: warning: exported method SELinuxStatus.IsInstalled should have comment or be unexported (golint)
    • Line 42: warning: exported type SELinuxMode should have comment or be unexported (golint)
    • Line 45: warning: exported const SELinuxModeUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: exported method SELinuxMode.IsUnknown should have comment or be unexported (golint)
    • Line 55: warning: exported method SELinuxMode.IsEnforcing should have comment or be unexported (golint)
    • Line 59: warning: exported method SELinuxMode.IsPermissive should have comment or be unexported (golint)
    • Line 63: warning: exported method SELinuxMode.IsDisabled should have comment or be unexported (golint)
    • Line 67: warning: exported function NewOS should have comment or be unexported (golint)
    • Line 76: warning: exported type GatherFactFunc should have comment or be unexported (golint)
    • Line 157: warning: exported method OS.Undo should have comment or be unexported (golint)
    • Line 161: warning: exported method OS.HasCommand should have comment or be unexported (golint)
    • Line 178: warning: exported method OS.GetSELinuxStatus should have comment or be unexported (golint)
    • Line 208: warning: exported method OS.IsSELinuxMode should have comment or be unexported (golint)
    • Line 219: warning: exported method OS.IsOSInContainerVM should have comment or be unexported (golint)
    • cluster-api-provider-existinginfra/pkg/specs/specs.go
    • Line 24: warning: exported type Specs should have comment or be unexported (golint)
    • Line 32: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 54: warning: comment on exported method Specs.GetClusterName should be of the form "GetClusterName ..." (golint)
    • Line 59: warning: exported method Specs.GetKubernetesVersion should have comment or be unexported (golint)
    • Line 63: warning: exported method Specs.GetMasterPublicAddress should have comment or be unexported (golint)
    • Line 67: warning: exported method Specs.GetMasterPrivateAddress should have comment or be unexported (golint)
    • Line 71: warning: exported method Specs.GetCloudProvider should have comment or be unexported (golint)
    • Line 75: warning: exported method Specs.GetKubeletArguments should have comment or be unexported (golint)
    • Line 79: warning: exported method Specs.GetAPIServerArguments should have comment or be unexported (golint)
    • Line 83: warning: exported method Specs.GetMachineCount should have comment or be unexported (golint)
    • Line 87: warning: exported method Specs.GetMasterCount should have comment or be unexported (golint)
    • Line 91: warning: exported function TranslateServerArgumentsToStringMap should have comment or be unexported (golint)
    • Line 99: warning: exported function PrintErrors should have comment or be unexported (golint)
    • cluster-api-provider-existinginfra/apis/baremetalproviderspec/v1alpha1/conversion.go
    • Line 28: warning: exported function Convert_v1alpha1_APIServer_To_v1alpha3_APIServer should have comment or be unexported (golint)
    • Line 28: warning: don't use underscores in Go names; func Convert_v1alpha1_APIServer_To_v1alpha3_APIServer should be ConvertV1alpha1APIServerToV1alpha3APIServer (golint)
    • Line 33: warning: exported function Convert_v1alpha1_ClusterSpec_To_v1alpha3_ClusterSpec should have comment or be unexported (golint)
    • Line 33: warning: don't use underscores in Go names; func Convert_v1alpha1_ClusterSpec_To_v1alpha3_ClusterSpec should be ConvertV1alpha1ClusterSpecToV1alpha3ClusterSpec (golint)
    • Line 38: warning: exported function Convert_v1alpha3_ClusterSpec_To_v1alpha1_ClusterSpec should have comment or be unexported (golint)
    • Line 38: warning: don't use underscores in Go names; func Convert_v1alpha3_ClusterSpec_To_v1alpha1_ClusterSpec should be ConvertV1alpha3ClusterSpecToV1alpha1ClusterSpec (golint)
    • Line 43: warning: exported function Convert_v1alpha1_MachineSpec_To_v1alpha3_MachineSpec should have comment or be unexported (golint)
    • Line 43: warning: don't use underscores in Go names; func Convert_v1alpha1_MachineSpec_To_v1alpha3_MachineSpec should be ConvertV1alpha1MachineSpecToV1alpha3MachineSpec (golint)
    • Line 52: warning: exported function Convert_v1alpha3_MachineSpec_To_v1alpha1_MachineSpec should have comment or be unexported (golint)
    • Line 52: warning: don't use underscores in Go names; func Convert_v1alpha3_MachineSpec_To_v1alpha1_MachineSpec should be ConvertV1alpha3MachineSpecToV1alpha1MachineSpec (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!