Preparing report...

Report for github.com/eddycharly/terraform-provider-kops

(v1.21.4)

A+    Excellent!    Found 32 issues across 248 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!


gocyclo99%

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.


golint87%

Golint is a linter for Go source code.

    • pkg/api/resources/InstanceGroup.go
    • Line 39: warning: exported function GetInstanceGroup should have comment or be unexported (golint)
    • Line 51: warning: exported function CreateInstanceGroup should have comment or be unexported (golint)
    • Line 63: warning: exported function UpdateInstanceGroup should have comment or be unexported (golint)
    • pkg/api/utils/cluster_validate.go
    • Line 18: warning: exported type ValidateOptions should have comment or be unexported (golint)
    • Line 64: warning: exported function ClusterIsValid 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 79: warning: exported function ClusterValidate should have comment or be unexported (golint)
    • Line 82: 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)
    • pkg/schemas/zzz_utils.go
    • Line 15: warning: exported function CustomizeDiffRevision should have comment or be unexported (golint)
    • Line 23: warning: exported function Nullable should have comment or be unexported (golint)
    • Line 33: warning: exported function ComplexMapElem should have comment or be unexported (golint)
    • Line 45: warning: exported function Schema should have comment or be unexported (golint)
    • Line 56: warning: exported function Simple should have comment or be unexported (golint)
    • Line 60: warning: exported function SimpleRequired should have comment or be unexported (golint)
    • Line 64: warning: exported function SimpleOptional should have comment or be unexported (golint)
    • Line 68: warning: exported function SimpleComputed should have comment or be unexported (golint)
    • Line 72: warning: exported function SimpleOptionalComputed should have comment or be unexported (golint)
    • Line 76: warning: exported function Sensitive should have comment or be unexported (golint)
    • Line 81: warning: exported function ForceNew should have comment or be unexported (golint)
    • Line 86: warning: exported function SuppressDiff should have comment or be unexported (golint)
    • Line 95: warning: exported function OptionalQuantity should have comment or be unexported (golint)
    • Line 99: warning: exported function ComputedQuantity should have comment or be unexported (golint)
    • Line 103: warning: exported function ExpandQuantity should have comment or be unexported (golint)
    • Line 108: warning: exported function FlattenQuantity should have comment or be unexported (golint)
    • Line 114: warning: exported function OptionalDuration should have comment or be unexported (golint)
    • Line 118: warning: exported function ComputedDuration should have comment or be unexported (golint)
    • Line 122: warning: exported function ExpandDuration should have comment or be unexported (golint)
    • Line 129: warning: exported function FlattenDuration should have comment or be unexported (golint)
    • Line 135: warning: exported function OptionalIntOrString should have comment or be unexported (golint)
    • Line 139: warning: exported function ComputedIntOrString should have comment or be unexported (golint)
    • Line 143: warning: exported function ExpandIntOrString should have comment or be unexported (golint)
    • Line 147: warning: exported function FlattenIntOrString should have comment or be unexported (golint)
    • Line 153: warning: exported function RequiredMap should have comment or be unexported (golint)
    • Line 157: warning: exported function OptionalMap should have comment or be unexported (golint)
    • Line 161: warning: exported function ComputedMap should have comment or be unexported (golint)
    • Line 165: warning: exported function OptionalComputedMap should have comment or be unexported (golint)
    • Line 171: warning: exported function OptionalComplexMap should have comment or be unexported (golint)
    • Line 175: warning: exported function ComputedComplexMap should have comment or be unexported (golint)
    • Line 181: warning: exported function RequiredStruct should have comment or be unexported (golint)
    • Line 185: warning: exported function OptionalStruct should have comment or be unexported (golint)
    • Line 189: warning: exported function ComputedStruct should have comment or be unexported (golint)
    • Line 193: warning: exported function OptionalComputedStruct should have comment or be unexported (golint)
    • Line 199: warning: exported function RequiredSetList should have comment or be unexported (golint)
    • Line 203: warning: exported function OptionalSetList should have comment or be unexported (golint)
    • Line 209: warning: exported function List should have comment or be unexported (golint)
    • Line 213: warning: exported function RequiredList should have comment or be unexported (golint)
    • Line 217: warning: exported function OptionalList should have comment or be unexported (golint)
    • Line 221: warning: exported function ComputedList should have comment or be unexported (golint)
    • Line 225: warning: exported function OptionalComputedList should have comment or be unexported (golint)
    • Line 231: warning: exported function String should have comment or be unexported (golint)
    • Line 235: warning: exported function RequiredString should have comment or be unexported (golint)
    • Line 239: warning: exported function OptionalString should have comment or be unexported (golint)
    • Line 243: warning: exported function ComputedString should have comment or be unexported (golint)
    • Line 247: warning: exported function OptionalComputedString should have comment or be unexported (golint)
    • Line 251: warning: exported function ExpandString should have comment or be unexported (golint)
    • Line 258: warning: exported function FlattenString should have comment or be unexported (golint)
    • Line 264: warning: exported function Bool should have comment or be unexported (golint)
    • Line 268: warning: exported function RequiredBool should have comment or be unexported (golint)
    • Line 272: warning: exported function OptionalBool should have comment or be unexported (golint)
    • Line 276: warning: exported function ComputedBool should have comment or be unexported (golint)
    • Line 280: warning: exported function OptionalComputedBool should have comment or be unexported (golint)
    • Line 284: warning: exported function ExpandBool should have comment or be unexported (golint)
    • Line 291: warning: exported function FlattenBool should have comment or be unexported (golint)
    • Line 297: warning: exported function Int should have comment or be unexported (golint)
    • Line 301: warning: exported function RequiredInt should have comment or be unexported (golint)
    • Line 305: warning: exported function OptionalInt should have comment or be unexported (golint)
    • Line 309: warning: exported function ComputedInt should have comment or be unexported (golint)
    • Line 313: warning: exported function OptionalComputedInt should have comment or be unexported (golint)
    • Line 317: warning: exported function ExpandInt should have comment or be unexported (golint)
    • Line 327: warning: exported function FlattenInt should have comment or be unexported (golint)
    • Line 333: warning: exported function Float should have comment or be unexported (golint)
    • Line 337: warning: exported function RequiredFloat should have comment or be unexported (golint)
    • Line 341: warning: exported function OptionalFloat should have comment or be unexported (golint)
    • Line 345: warning: exported function ComputedFloat should have comment or be unexported (golint)
    • Line 349: warning: exported function OptionalComputedFloat should have comment or be unexported (golint)
    • Line 353: warning: exported function ExpandFloat should have comment or be unexported (golint)
    • Line 360: warning: exported function FlattenFloat should have comment or be unexported (golint)
    • pkg/config/config.go
    • Line 40: warning: exported function ConfigureProvider should have comment or be unexported (golint)
    • Line 69: warning: exported function Clientset should have comment or be unexported (golint)
    • pkg/resources/Cluster.go
    • Line 14: warning: exported function Cluster should have comment or be unexported (golint)
    • Line 31: warning: exported function ClusterCreate should have comment or be unexported (golint)
    • Line 35: 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 41: warning: exported function ClusterUpdate should have comment or be unexported (golint)
    • Line 45: 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 51: warning: exported function ClusterRead 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 68: warning: exported function ClusterDelete should have comment or be unexported (golint)
    • Line 76: warning: exported function ClusterImport should have comment or be unexported (golint)
    • Line 79: 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)
    • pkg/datasources/ClusterStatus.go
    • Line 12: warning: exported function ClusterStatus should have comment or be unexported (golint)
    • Line 19: warning: exported function ClusterStatusRead should have comment or be unexported (golint)
    • pkg/api/kube/Config.go
    • Line 10: warning: exported type Config should have comment or be unexported (golint)
    • Line 29: warning: exported method Config.GetConfig should have comment or be unexported (golint)
    • pkg/datasources/Cluster.go
    • Line 13: warning: exported function Cluster should have comment or be unexported (golint)
    • Line 23: warning: exported function ClusterRead should have comment or be unexported (golint)
    • pkg/datasources/InstanceGroup.go
    • Line 13: warning: exported function InstanceGroup should have comment or be unexported (golint)
    • Line 23: warning: exported function InstanceGroupRead should have comment or be unexported (golint)
    • pkg/api/datasources/ClusterStatus.go
    • Line 22: warning: exported method ClusterStatus.GetClusterStatus should have comment or be unexported (golint)
    • Line 25: 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 29: 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 34: 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)
    • pkg/resources/InstanceGroup.go
    • Line 17: warning: exported function InstanceGroup should have comment or be unexported (golint)
    • Line 32: warning: exported function InstanceGroupCreate should have comment or be unexported (golint)
    • Line 36: 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 42: warning: exported function InstanceGroupUpdate should have comment or be unexported (golint)
    • Line 46: 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 52: warning: exported function InstanceGroupRead should have comment or be unexported (golint)
    • Line 56: 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 69: warning: exported function InstanceGroupDelete should have comment or be unexported (golint)
    • Line 77: warning: exported function InstanceGroupImport should have comment or be unexported (golint)
    • Line 80: 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 83: 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)
    • pkg/api/resources/Cluster.go
    • Line 47: warning: exported function GetCluster should have comment or be unexported (golint)
    • Line 76: warning: exported function CreateCluster should have comment or be unexported (golint)
    • Line 119: warning: exported function UpdateCluster should have comment or be unexported (golint)
    • Line 158: warning: exported function DeleteCluster should have comment or be unexported (golint)
    • pkg/api/utils/cluster_rolling_update.go
    • Line 19: warning: exported type RollingUpdateOptions should have comment or be unexported (golint)
    • Line 42: warning: exported function ClusterInstanceGroupsNeedingUpdate should have comment or be unexported (golint)
    • Line 107: warning: exported function ClusterRollingUpdate should have comment or be unexported (golint)
    • pkg/resources/ClusterUpdater.go
    • Line 13: warning: exported function ClusterUpdater should have comment or be unexported (golint)
    • Line 24: warning: exported function ClusterUpdaterCreateOrUpdate should have comment or be unexported (golint)
    • Line 33: warning: exported function ClusterUpdaterDelete should have comment or be unexported (golint)
    • pkg/datasources/KubeConfig.go
    • Line 12: warning: exported function KubeConfig should have comment or be unexported (golint)
    • Line 19: warning: exported function KubeConfigRead 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!