Preparing report...

Report for github.com/terraform-providers/terraform-provider-rancher2

A+    Excellent!    Found 78 issues across 520 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!


golint95%

Golint is a linter for Go source code.

    • terraform-provider-rancher2/rancher2/util.go
    • Line 35: warning: exported function AreEqual should have comment or be unexported (golint)
    • Line 39: warning: exported function Base64Encode should have comment or be unexported (golint)
    • Line 48: warning: exported function Base64Decode should have comment or be unexported (golint)
    • Line 57: warning: exported function IsBase64 should have comment or be unexported (golint)
    • Line 62: warning: exported function TrimSpace should have comment or be unexported (golint)
    • Line 66: warning: exported function ToLower should have comment or be unexported (golint)
    • Line 70: warning: exported function GetRandomPass should have comment or be unexported (golint)
    • Line 79: warning: exported function HashPasswordString should have comment or be unexported (golint)
    • Line 87: warning: exported function NewListOpts should have comment or be unexported (golint)
    • Line 96: warning: exported function DoUserLogin should have comment or be unexported (golint)
    • Line 117: warning: exported function DoPost should have comment or be unexported (golint)
    • Line 172: warning: exported function DoGet should have comment or be unexported (golint)
    • Line 233: warning: exported function NormalizeURL should have comment or be unexported (golint)
    • Line 247: warning: exported function RootURL should have comment or be unexported (golint)
    • Line 255: warning: exported function IsNotFound should have comment or be unexported (golint)
    • Line 486: warning: exported function FileExist should have comment or be unexported (golint)
    • Line 511: warning: exported function IsVersionLessThanl should have comment or be unexported (golint)
    • Line 523: warning: exported function IsVersionGreaterThanOrEqual should have comment or be unexported (golint)
    • terraform-provider-rancher2/rancher2/config.go
    • Line 151: warning: exported method Config.IsRancherVersionLessThan should have comment or be unexported (golint)
    • Line 162: warning: exported method Config.IsRancherVersionGreaterThanOrEqual should have comment or be unexported (golint)
    • Line 305: warning: exported method Config.NormalizeURL should have comment or be unexported (golint)
    • Line 309: warning: exported method Config.CreateClientOpts should have comment or be unexported (golint)
    • Line 322: warning: exported method Config.GetProjectRoleTemplateBindingsByProjectID should have comment or be unexported (golint)
    • Line 352: warning: exported method Config.IsProjectDefault should have comment or be unexported (golint)
    • Line 366: warning: exported method Config.IsProjectSystem should have comment or be unexported (golint)
    • Line 380: warning: exported method Config.GetProjectByName should have comment or be unexported (golint)
    • Line 405: warning: exported method Config.GetProjectIDByName should have comment or be unexported (golint)
    • Line 417: warning: exported method Config.GetProjectNameByID should have comment or be unexported (golint)
    • Line 430: warning: exported method Config.GetProjectByID should have comment or be unexported (golint)
    • Line 443: warning: exported method Config.ProjectExist should have comment or be unexported (golint)
    • Line 452: warning: exported method Config.GetGlobalRoleByID should have comment or be unexported (golint)
    • Line 465: warning: exported method Config.GlobalRoleExist should have comment or be unexported (golint)
    • Line 474: warning: exported method Config.GetRoleTemplateByID should have comment or be unexported (golint)
    • Line 487: warning: exported method Config.RoleTemplateExist should have comment or be unexported (golint)
    • Line 496: warning: exported method Config.GetClusterProjects should have comment or be unexported (golint)
    • Line 517: warning: exported method Config.GetClusterSpecialProjectsID should have comment or be unexported (golint)
    • Line 547: warning: exported method Config.GetClusterByName should have comment or be unexported (golint)
    • Line 573: warning: exported method Config.GetClusterIDByName should have comment or be unexported (golint)
    • Line 585: warning: exported method Config.GetClusterByID should have comment or be unexported (golint)
    • Line 598: warning: exported method Config.UpdateClusterByID should have comment or be unexported (golint)
    • Line 624: warning: exported method Config.ClusterExist should have comment or be unexported (golint)
    • Line 633: warning: exported method Config.GetClusterRegistrationTokenByID should have comment or be unexported (golint)
    • Line 646: warning: exported method Config.ClusterRegistrationTokenExist should have comment or be unexported (golint)
    • Line 655: warning: exported method Config.CheckAuthConfigEnabled should have comment or be unexported (golint)
    • Line 682: warning: exported method Config.GetAuthConfig should have comment or be unexported (golint)
    • Line 701: warning: exported method Config.UpdateAuthConfig should have comment or be unexported (golint)
    • Line 705: warning: exported method Config.GetUserByName should have comment or be unexported (golint)
    • Line 730: warning: exported method Config.GetUserIDByName should have comment or be unexported (golint)
    • Line 769: warning: exported method Config.UserPasswordChanged should have comment or be unexported (golint)
    • Line 779: warning: exported method Config.SetUserPasswordByName should have comment or be unexported (golint)
    • Line 799: warning: exported method Config.SetUserPassword should have comment or be unexported (golint)
    • Line 850: warning: exported method Config.IsTokenExpired should have comment or be unexported (golint)
    • Line 871: warning: exported method Config.DeleteToken should have comment or be unexported (golint)
    • Line 892: warning: exported method Config.GetSetting should have comment or be unexported (golint)
    • Line 901: warning: exported method Config.SetSetting should have comment or be unexported (golint)
    • Line 924: warning: exported method Config.GetSettingValue should have comment or be unexported (golint)
    • Line 933: warning: exported method Config.GetCatalogByName should have comment or be unexported (golint)
    • Line 958: warning: exported method Config.GetCatalog should have comment or be unexported (golint)
    • Line 980: warning: exported method Config.CreateCatalog should have comment or be unexported (golint)
    • Line 1002: warning: exported method Config.UpdateCatalog should have comment or be unexported (golint)
    • Line 1024: warning: exported method Config.DeleteCatalog should have comment or be unexported (golint)
    • Line 1046: warning: exported method Config.RefreshCatalog should have comment or be unexported (golint)
    • Line 1093: warning: exported method Config.GetRegistryByFilters should have comment or be unexported (golint)
    • Line 1112: warning: exported method Config.GetRegistry should have comment or be unexported (golint)
    • Line 1112: warning: don't use underscores in Go names; method parameter project_id should be projectID (golint)
    • Line 1112: warning: don't use underscores in Go names; method parameter namespace_id should be namespaceID (golint)
    • Line 1145: warning: exported method Config.CreateRegistry should have comment or be unexported (golint)
    • Line 1176: warning: exported method Config.UpdateRegistry should have comment or be unexported (golint)
    • Line 1207: warning: exported method Config.DeleteRegistry should have comment or be unexported (golint)
    • Line 1222: warning: exported method Config.GetSecretByFilters should have comment or be unexported (golint)
    • Line 1241: warning: exported method Config.GetSecret should have comment or be unexported (golint)
    • Line 1241: warning: don't use underscores in Go names; method parameter project_id should be projectID (golint)
    • Line 1241: warning: don't use underscores in Go names; method parameter namespace_id should be namespaceID (golint)
    • Line 1274: warning: exported method Config.CreateSecret should have comment or be unexported (golint)
    • Line 1305: warning: exported method Config.UpdateSecret should have comment or be unexported (golint)
    • Line 1336: warning: exported method Config.DeleteSecret should have comment or be unexported (golint)
    • Line 1351: warning: exported method Config.GetCertificateByFilters should have comment or be unexported (golint)
    • Line 1370: warning: exported method Config.GetCertificate should have comment or be unexported (golint)
    • Line 1370: warning: don't use underscores in Go names; method parameter project_id should be projectID (golint)
    • Line 1370: warning: don't use underscores in Go names; method parameter namespace_id should be namespaceID (golint)
    • Line 1403: warning: exported method Config.CreateCertificate should have comment or be unexported (golint)
    • Line 1434: warning: exported method Config.UpdateCertificate should have comment or be unexported (golint)
    • Line 1465: warning: exported method Config.DeleteCertificate should have comment or be unexported (golint)
    • Line 1480: warning: exported method Config.GetRecipientByNotifier should have comment or be unexported (golint)

gocyclo89%

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.


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!