Preparing report...

Report for github.com/lastbackend/cli

A+    Excellent!    Found 44 issues across 92 files

Tweet

gofmt93%

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.


golint56%

Golint is a linter for Go source code.

    • cli/pkg/cli/view/node.go
    • Line 32: warning: exported type NodeList should have comment or be unexported (golint)
    • Line 33: warning: exported type Node should have comment or be unexported (golint)
    • Line 35: warning: exported method NodeList.Print should have comment or be unexported (golint)
    • Line 63: warning: exported method Node.Print should have comment or be unexported (golint)
    • Line 90: warning: exported function FromApiNodeView should have comment or be unexported (golint)
    • Line 100: warning: exported function FromApiNodeListView should have comment or be unexported (golint)
    • cli/pkg/client/genesis/types/types.go
    • Line 27: warning: exported type ClientV1 should have comment or be unexported (golint)
    • Line 33: warning: exported type AccountClientV1 should have comment or be unexported (golint)
    • Line 38: warning: exported type ClusterClientV1 should have comment or be unexported (golint)
    • Line 43: warning: exported type RegistryClientV1 should have comment or be unexported (golint)
    • cli/pkg/client/genesis/http/v1/request/request.go
    • Line 21: warning: exported type IRequest should have comment or be unexported (golint)
    • Line 25: warning: exported type Request should have comment or be unexported (golint)
    • Line 27: warning: exported function New should have comment or be unexported (golint)
    • Line 31: warning: exported method Request.Account should have comment or be unexported (golint)
    • cli/pkg/util/converter/converter.go
    • Line 27: warning: exported function StringToInt64 should have comment or be unexported (golint)
    • Line 32: warning: exported function StringToInt should have comment or be unexported (golint)
    • Line 37: warning: exported function IntToString should have comment or be unexported (golint)
    • Line 41: warning: exported function StringToBool should have comment or be unexported (golint)
    • Line 49: warning: exported function Int64ToInt should have comment or be unexported (golint)
    • Line 53: warning: exported function DecodeBase64 should have comment or be unexported (golint)
    • cli/pkg/cli/storage/storage.go
    • Line 38: warning: exported type Cluster should have comment or be unexported (golint)
    • Line 44: warning: exported function SetToken should have comment or be unexported (golint)
    • Line 48: warning: exported function GetToken should have comment or be unexported (golint)
    • Line 56: warning: exported function AddLocalCluster should have comment or be unexported (golint)
    • Line 83: warning: exported function ListLocalCluster should have comment or be unexported (golint)
    • Line 102: warning: exported function GetLocalCluster should have comment or be unexported (golint)
    • Line 117: warning: exported function DelLocalCluster should have comment or be unexported (golint)
    • Line 139: warning: exported function SetCluster should have comment or be unexported (golint)
    • Line 143: warning: exported function GetCluster should have comment or be unexported (golint)
    • cli/pkg/cli/view/discovery.go
    • Line 32: warning: exported type DiscoveryList should have comment or be unexported (golint)
    • Line 33: warning: exported type Discovery should have comment or be unexported (golint)
    • Line 35: warning: exported method DiscoveryList.Print should have comment or be unexported (golint)
    • Line 63: warning: exported method Discovery.Print should have comment or be unexported (golint)
    • Line 90: warning: exported function FromApiDiscoveryView should have comment or be unexported (golint)
    • Line 100: warning: exported function FromApiDiscoveryListView should have comment or be unexported (golint)
    • cli/pkg/cli/view/namespace.go
    • Line 27: warning: exported type NamespaceList should have comment or be unexported (golint)
    • Line 28: warning: exported type Namespace should have comment or be unexported (golint)
    • Line 29: warning: exported type NamespaceApplyStatus should have comment or be unexported (golint)
    • Line 31: warning: exported method Namespace.Print should have comment or be unexported (golint)
    • Line 42: warning: exported method NamespaceList.Print should have comment or be unexported (golint)
    • Line 62: warning: exported method NamespaceApplyStatus.Print should have comment or be unexported (golint)
    • Line 109: warning: exported function FromApiNamespaceView should have comment or be unexported (golint)
    • Line 119: warning: exported function FromApiNamespaceListView should have comment or be unexported (golint)
    • Line 127: warning: exported function FromApiNamespaceStatusView should have comment or be unexported (golint)
    • cli/pkg/client/genesis/genesis.go
    • Line 29: warning: exported const ClientHTTP should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported type IClient should have comment or be unexported (golint)
    • Line 37: warning: exported function New should have comment or be unexported (golint)
    • Line 47: warning: exported function NewConfig should have comment or be unexported (golint)
    • cli/pkg/cli/envs/envs.go
    • Line 30: warning: exported function Get should have comment or be unexported (golint)
    • Line 34: warning: exported function Background should have comment or be unexported (golint)
    • Line 38: warning: exported function Mock should have comment or be unexported (golint)
    • cli/pkg/cli/view/cluster.go
    • Line 29: warning: exported type ClusterList should have comment or be unexported (golint)
    • Line 31: warning: exported type Cluster should have comment or be unexported (golint)
    • Line 37: warning: exported type ClusterMeta should have comment or be unexported (golint)
    • Line 42: warning: exported type ClusterSpec should have comment or be unexported (golint)
    • Line 46: warning: exported method ClusterList.Print should have comment or be unexported (golint)
    • Line 71: warning: exported method Cluster.Print should have comment or be unexported (golint)
    • Line 81: warning: exported function FromLbApiClusterView should have comment or be unexported (golint)
    • Line 91: warning: exported function FromGenesisApiClusterView should have comment or be unexported (golint)
    • Line 102: warning: exported function FromGenesisApiClusterListView should have comment or be unexported (golint)
    • Line 114: warning: exported function FromStorageClusterList should have comment or be unexported (golint)
    • cli/pkg/cli/view/secret.go
    • Line 26: warning: exported type SecretList should have comment or be unexported (golint)
    • Line 27: warning: exported type Secret should have comment or be unexported (golint)
    • Line 29: warning: exported method SecretList.Print should have comment or be unexported (golint)
    • Line 50: warning: exported method Secret.Print should have comment or be unexported (golint)
    • Line 65: warning: exported function FromApiSecretView should have comment or be unexported (golint)
    • Line 75: warning: exported function FromApiSecretListView should have comment or be unexported (golint)
    • cli/pkg/client/genesis/http/v1/views/cluster.go
    • Line 23: warning: comment on exported type ClusterList should be of the form "ClusterList ..." (with optional leading article) (golint)
    • Line 29: warning: exported type ClusterView should have comment or be unexported (golint)
    • Line 35: warning: exported type ClusterSpec should have comment or be unexported (golint)
    • cli/pkg/client/client.go
    • Line 27: warning: exported type Client should have comment or be unexported (golint)
    • Line 33: warning: exported function NewGenesisCluster should have comment or be unexported (golint)
    • Line 60: warning: exported function NewClusterClient should have comment or be unexported (golint)
    • Line 94: warning: exported function NewRegistryClient should have comment or be unexported (golint)
    • cli/pkg/client/genesis/http/v1/client/client.go
    • Line 26: warning: exported type Client should have comment or be unexported (golint)
    • Line 30: warning: exported function New should have comment or be unexported (golint)
    • Line 34: warning: exported method Client.Registry should have comment or be unexported (golint)
    • Line 38: warning: exported method Client.Account should have comment or be unexported (golint)
    • Line 42: warning: exported method Client.Cluster should have comment or be unexported (golint)
    • cli/pkg/cli/view/volume.go
    • Line 26: warning: exported type VolumeList should have comment or be unexported (golint)
    • Line 27: warning: exported type Volume should have comment or be unexported (golint)
    • Line 29: warning: exported method VolumeList.Print should have comment or be unexported (golint)
    • Line 48: warning: exported method Volume.Print should have comment or be unexported (golint)
    • Line 59: warning: exported function FromApiVolumeView should have comment or be unexported (golint)
    • Line 64: warning: exported function FromApiVolumeListView should have comment or be unexported (golint)
    • cli/pkg/cli/view/ingress.go
    • Line 32: warning: exported type IngressList should have comment or be unexported (golint)
    • Line 33: warning: exported type Ingress should have comment or be unexported (golint)
    • Line 35: warning: exported method IngressList.Print should have comment or be unexported (golint)
    • Line 63: warning: exported method Ingress.Print should have comment or be unexported (golint)
    • Line 90: warning: exported function FromApiIngressView should have comment or be unexported (golint)
    • Line 100: warning: exported function FromApiIngressListView should have comment or be unexported (golint)
    • cli/pkg/util/table/table.go
    • Line 35: warning: exported function New should have comment or be unexported (golint)
    • Line 63: warning: exported function PrintHorizontal should have comment or be unexported (golint)
    • cli/pkg/cli/view/config.go
    • Line 26: warning: exported type ConfigList should have comment or be unexported (golint)
    • Line 27: warning: exported type Config should have comment or be unexported (golint)
    • Line 29: warning: exported method ConfigList.Print should have comment or be unexported (golint)
    • Line 45: warning: exported method Config.Print should have comment or be unexported (golint)
    • Line 54: warning: exported function FromApiConfigView should have comment or be unexported (golint)
    • Line 64: warning: exported function FromApiConfigListView should have comment or be unexported (golint)
    • cli/pkg/cli/view/job.go
    • Line 33: warning: exported type JobList should have comment or be unexported (golint)
    • Line 34: warning: exported type Job should have comment or be unexported (golint)
    • Line 36: warning: exported method JobList.Print should have comment or be unexported (golint)
    • Line 55: warning: exported method Job.Print should have comment or be unexported (golint)
    • Line 112: warning: exported method Job.PrintTask should have comment or be unexported (golint)
    • Line 167: warning: exported function FromApiJobView should have comment or be unexported (golint)
    • Line 177: warning: exported function FromApiJobListView should have comment or be unexported (golint)
    • cli/pkg/util/filesystem/filesystem.go
    • Line 29: warning: comment on exported function IsWindows should be of the form "IsWindows ..." (golint)
    • Line 53: warning: exported function WriteStrToFile should have comment or be unexported (golint)
    • Line 64: warning: exported function ReadFile should have comment or be unexported (golint)
    • cli/pkg/client/genesis/http/http.go
    • Line 31: warning: exported type Client should have comment or be unexported (golint)
    • Line 35: warning: exported function View should have comment or be unexported (golint)
    • Line 39: warning: exported function Request should have comment or be unexported (golint)
    • Line 43: warning: exported function New should have comment or be unexported (golint)
    • Line 66: warning: exported method Client.V1 should have comment or be unexported (golint)
    • cli/pkg/cli/view/route.go
    • Line 26: warning: exported type RouteList should have comment or be unexported (golint)
    • Line 27: warning: exported type Route should have comment or be unexported (golint)
    • Line 29: warning: exported method RouteList.Print should have comment or be unexported (golint)
    • Line 49: warning: exported method Route.Print should have comment or be unexported (golint)
    • Line 77: warning: exported function FromApiRouteView should have comment or be unexported (golint)
    • Line 87: warning: exported function FromApiRouteListView should have comment or be unexported (golint)
    • cli/pkg/cli/view/service.go
    • Line 34: warning: exported type ServiceList should have comment or be unexported (golint)
    • Line 35: warning: exported type Service should have comment or be unexported (golint)
    • Line 37: warning: exported method ServiceList.Print should have comment or be unexported (golint)
    • Line 57: warning: exported method Service.Print should have comment or be unexported (golint)
    • Line 157: warning: exported method Service.PrintDeployment should have comment or be unexported (golint)
    • Line 211: warning: exported function FromApiServiceView should have comment or be unexported (golint)
    • Line 221: warning: exported function FromApiServiceListView should have comment or be unexported (golint)
    • cli/pkg/cli/view/task.go
    • Line 31: warning: exported type Task should have comment or be unexported (golint)
    • Line 33: warning: exported method Task.Print should have comment or be unexported (golint)
    • Line 128: warning: exported function FromApiTaskView should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words