Preparing report...

Report for github.com/kube-champ/terraform-operator

(v0.0.0-20220122192158-92922222bb1a)

A+    Excellent!    Found 13 issues across 30 files

Tweet

gofmt80%

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!


gocyclo100%

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.

No problems detected. Good job!


golint80%

Golint is a linter for Go source code.

    • api/v1alpha1/terraform_types.go
    • Line 33: warning: exported type Module should have comment or be unexported (golint)
    • Line 41: warning: exported type VariableFile should have comment or be unexported (golint)
    • Line 49: warning: exported type Variable should have comment or be unexported (golint)
    • Line 82: warning: comment on exported type GitSSHKeySpec should be of the form "GitSSHKeySpec ..." (with optional leading article) (golint)
    • Line 87: warning: exported type TerraformRunStatus should have comment or be unexported (golint)
    • Line 90: warning: exported const RunStarted should have comment (or a comment on this block) or be unexported (golint)
    • Line 98: warning: comment on exported type PreviousRunStatus should be of the form "PreviousRunStatus ..." (with optional leading article) (golint)
    • Line 187: warning: comment on exported method Terraform.IsSubmitted should be of the form "IsSubmitted ..." (golint)
    • Line 192: warning: comment on exported method Terraform.IsStarted should be of the form "IsStarted ..." (golint)
    • Line 202: warning: comment on exported method Terraform.IsRunning should be of the form "IsRunning ..." (golint)
    • Line 207: warning: comment on exported method Terraform.IsUpdated should be of the form "IsUpdated ..." (golint)
    • Line 212: warning: comment on exported method Terraform.IsWaiting should be of the form "IsWaiting ..." (golint)
    • Line 217: warning: exported method Terraform.HasErrored should have comment or be unexported (golint)
    • Line 221: warning: exported method Terraform.SetRunId should have comment or be unexported (golint)
    • Line 221: warning: receiver name r should be consistent with previous receiver name t for Terraform (golint)
    • Line 225: warning: exported method Terraform.PrepareForUpdate should have comment or be unexported (golint)
    • Line 236: warning: comment on exported method Terraform.GetOwnerReference should be of the form "GetOwnerReference ..." (golint)
    • Line 248: warning: comment on exported method Terraform.CreateTerraformRun should be of the form "CreateTerraformRun ..." (golint)
    • Line 275: warning: exported method Terraform.DeleteAfterCompletion should have comment or be unexported (golint)
    • Line 283: warning: exported method Terraform.GetJobByRun should have comment or be unexported (golint)
    • Line 293: warning: exported method Terraform.DependenciesCompleted should have comment or be unexported (golint)
    • pkg/kube/client.go
    • Line 15: warning: exported var ClientSet should have comment or be unexported (golint)
    • Line 17: warning: exported function CreateK8SConfig should have comment or be unexported (golint)
    • pkg/utils/env.go
    • Line 8: warning: exported type EnvConfig should have comment or be unexported (golint)
    • Line 15: warning: exported var Env should have comment or be unexported (golint)
    • Line 37: warning: exported function LoadEnv should have comment or be unexported (golint)
    • pkg/utils/file.go
    • Line 7: warning: exported function FileExists should have comment or be unexported (golint)
    • Line 17: warning: exported function CreateFile should have comment or be unexported (golint)
    • Line 27: warning: exported function WriteFile should have comment or be unexported (golint)
    • Line 33: warning: exported function Mkdir should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words