Preparing report...

Report for github.com/gosoon/kubernetes-operator

A+    Excellent!    Found 31 issues across 123 files

Tweet

gofmt94%

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!


gocyclo98%

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.


golint80%

Golint is a linter for Go source code.

    • kubernetes-operator/pkg/apis/ecs/v1/types.go
    • Line 77: warning: comment on exported const KubernetesClusterType should be of the form "KubernetesClusterType ..." (golint)
    • Line 80: warning: comment on exported const K3sClusterType should be of the form "K3sClusterType ..." (golint)
    • Line 83: warning: comment on exported const KubeedgeClusterType should be of the form "KubeedgeClusterType ..." (golint)
    • Line 86: warning: comment on exported const KindClusterType should be of the form "KindClusterType ..." (golint)
    • Line 151: warning: exported const SecondaryControlPlaneRole should have comment (or a comment on this block) or be unexported (golint)
    • Line 157: warning: comment on exported type KubernetesOperatorPhase should be of the form "KubernetesOperatorPhase ..." (with optional leading article) (golint)
    • Line 166: warning: comment on exported const BinaryDeployMode should be of the form "BinaryDeployMode ..." (golint)
    • Line 169: warning: comment on exported const ContainerDeployMode should be of the form "ContainerDeployMode ..." (golint)
    • kubernetes-operator/cmd/installer/ssh/ansibleinit.go
    • Line 46: warning: comment on exported const DeployEtcdCmd should be of the form "DeployEtcdCmd ..." (golint)
    • Line 50: warning: exported const DeployMasterCmd should have comment (or a comment on this block) or be unexported (golint)
    • Line 67: warning: comment on exported const OperationEnv should be of the form "OperationEnv ..." (golint)
    • Line 88: warning: comment on exported const EnvFileName should be of the form "EnvFileName ..." (golint)
    • Line 97: warning: exported var ExternalLoadBalancerVal should have its own declaration (golint)
    • Line 98: warning: exported var ClusterNamespaceVal should have its own declaration (golint)
    • kubernetes-operator/pkg/installer/cluster/nodes/systemd.go
    • Line 23: warning: exported const KubeletServiceConfigDir should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: comment on exported const KubeletServiceContents should be of the form "KubeletServiceContents ..." (golint)
    • Line 44: warning: comment on exported const Kubeadm10conf should be of the form "Kubeadm10conf ..." (golint)
    • kubernetes-operator/pkg/enum/task.go
    • Line 28: warning: comment on exported const KubeCreating should be of the form "KubeCreating ..." (golint)
    • Line 30: warning: exported const KubeCreateFailed should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: comment on exported const KubeUpdating should be of the form "KubeUpdating ..." (golint)
    • Line 50: warning: comment on exported const New should be of the form "New ..." (golint)
    • Line 59: warning: comment on exported const EcsSyncSuccess should be of the form "EcsSyncSuccess ..." (golint)
    • Line 62: warning: comment on exported const SyncedSuccess should be of the form "SyncedSuccess ..." (golint)
    • Line 65: warning: comment on exported const CreateKubeJobSuccess should be of the form "CreateKubeJobSuccess ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!