Preparing report...

Report for github.com/codeready-toolchain/devcluster

A+    Excellent!    Found 13 issues across 46 files

Tweet

gofmt97%

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!


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.


golint73%

Golint is a linter for Go source code.

    • devcluster/pkg/controller/health_check.go
    • Line 12: warning: exported type HealthCheckConfig should have comment or be unexported (golint)
    • Line 22: warning: comment on exported function NewHealthCheck should be of the form "NewHealthCheck ..." (golint)
    • Line 52: warning: exported type HealthChecker should have comment or be unexported (golint)
    • Line 56: warning: exported function NewHealthChecker should have comment or be unexported (golint)
    • devcluster/pkg/ibmcloud/user.go
    • Line 22: warning: exported type CloudDirectoryUser should have comment or be unexported (golint)
    • Line 30: warning: exported type Value should have comment or be unexported (golint)
    • Line 34: warning: exported method CloudDirectoryUser.Email should have comment or be unexported (golint)
    • Line 41: warning: exported const CloudDirectoryUserTemplate should have comment or be unexported (golint)
    • Line 175: warning: exported type IAMUserResult should have comment or be unexported (golint)
    • Line 181: warning: exported type IAMUser should have comment or be unexported (golint)
    • Line 252: warning: exported const AccessPolicyTemplate should have comment or be unexported (golint)
    • Line 271: warning: exported type AccessPolicy should have comment or be unexported (golint)
    • devcluster/test/ibmcloud/ibmcloud.go
    • Line 15: warning: exported type MockIBMCloudClient should have comment or be unexported (golint)
    • Line 26: warning: exported function NewMockIBMCloudClient should have comment or be unexported (golint)
    • Line 36: warning: exported method MockIBMCloudClient.GetZones should have comment or be unexported (golint)
    • Line 52: warning: exported method MockIBMCloudClient.GetVlans should have comment or be unexported (golint)
    • Line 56: warning: exported method MockIBMCloudClient.CreateCluster should have comment or be unexported (golint)
    • Line 81: warning: exported method MockIBMCloudClient.GetCluster should have comment or be unexported (golint)
    • Line 91: warning: exported method MockIBMCloudClient.DeleteCluster should have comment or be unexported (golint)
    • Line 104: warning: exported method MockIBMCloudClient.UpdateCluster should have comment or be unexported (golint)
    • Line 117: warning: exported method MockIBMCloudClient.CreateCloudDirectoryUser should have comment or be unexported (golint)
    • Line 138: warning: exported method MockIBMCloudClient.UpdateCloudDirectoryUserPassword should have comment or be unexported (golint)
    • Line 149: warning: exported method MockIBMCloudClient.GetIAMUserByUserID should have comment or be unexported (golint)
    • Line 159: warning: exported method MockIBMCloudClient.CreateAccessPolicy should have comment or be unexported (golint)
    • Line 167: warning: exported method MockIBMCloudClient.DeleteAccessPolicy should have comment or be unexported (golint)
    • Line 174: warning: exported method MockIBMCloudClient.AccessPolicyExists should have comment or be unexported (golint)
    • devcluster/pkg/mongodb/mongo.go
    • Line 16: warning: exported type Config should have comment or be unexported (golint)
    • Line 27: warning: exported function InitDefaultClient should have comment or be unexported (golint)
    • Line 55: warning: exported function Devcluster should have comment or be unexported (golint)
    • Line 59: warning: exported function ClusterRequests should have comment or be unexported (golint)
    • Line 63: warning: exported function Clusters should have comment or be unexported (golint)
    • Line 67: warning: exported function Users should have comment or be unexported (golint)
    • devcluster/pkg/cluster/service.go
    • Line 20: warning: exported const StatusDeleted should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: comment on exported type RequestWithClusters should be of the form "RequestWithClusters ..." (with optional leading article) (golint)
    • Line 50: warning: exported type Cluster should have comment or be unexported (golint)
    • Line 68: warning: exported type User should have comment or be unexported (golint)
    • Line 78: warning: exported var DefaultClusterService should have comment or be unexported (golint)
    • Line 86: warning: exported function InitDefaultClusterService should have comment or be unexported (golint)
    • Line 93: warning: exported method ClusterService.Requests should have comment or be unexported (golint)
    • Line 97: warning: exported method ClusterService.GetZones should have comment or be unexported (golint)
    • Line 101: warning: exported method ClusterService.GetRequestWithClusters should have comment or be unexported (golint)
    • Line 111: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 514: warning: exported method ClusterService.Users should have comment or be unexported (golint)
    • devcluster/pkg/errors/error.go
    • Line 10: warning: exported type Error should have comment or be unexported (golint)
    • Line 27: warning: exported function NewNotFoundError should have comment or be unexported (golint)
    • Line 36: warning: exported function NewInternalServerError should have comment or be unexported (golint)
    • Line 49: warning: exported function IsNotFound should have comment or be unexported (golint)
    • Line 59: warning: exported function IsInternalServerError should have comment or be unexported (golint)
    • devcluster/pkg/ibmcloud/cluster.go
    • Line 22: warning: exported type Configuration should have comment or be unexported (golint)
    • Line 31: warning: exported type ICClient should have comment or be unexported (golint)
    • Line 44: warning: exported type Client should have comment or be unexported (golint)
    • Line 50: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 56: warning: exported method Client.GetToken should have comment or be unexported (golint)
    • Line 88: warning: exported type Vlan should have comment or be unexported (golint)
    • Line 149: warning: exported type Location should have comment or be unexported (golint)
    • Line 196: warning: exported type ID should have comment or be unexported (golint)
    • Line 200: warning: exported const ClusterConfigTemplate should have comment or be unexported (golint)
    • Line 213: warning: exported type IBMCloudClusterRequest should have comment or be unexported (golint)
    • Line 288: warning: exported type Cluster should have comment or be unexported (golint)
    • Line 304: warning: exported type Ingress should have comment or be unexported (golint)

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!