Preparing report...

Report for github.com/kubernetes-sigs/bootkube

A+    Excellent!    Found 18 issues across 57 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!


gocyclo91%

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.

    • bootkube/pkg/checkpoint/process.go
    • Line 117: warning: cyclomatic complexity 20 of function (*checkpoints).process() is high (> 15) (gocyclo)
    • Line 37: warning: cyclomatic complexity 16 of function (*checkpoints).update() is high (> 15) (gocyclo)

golint77%

Golint is a linter for Go source code.

    • bootkube/pkg/tlsutil/tlsutil.go
    • Line 17: warning: exported const RSAKeySize should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported type CertConfig should have comment or be unexported (golint)
    • Line 36: warning: exported function NewPrivateKey should have comment or be unexported (golint)
    • Line 40: warning: exported function EncodePublicKeyPEM should have comment or be unexported (golint)
    • Line 52: warning: exported function EncodePrivateKeyPEM should have comment or be unexported (golint)
    • Line 60: warning: exported function EncodeCertificatePEM should have comment or be unexported (golint)
    • Line 68: warning: exported function NewSelfSignedCACertificate should have comment or be unexported (golint)
    • Line 91: warning: exported function ParsePEMEncodedCACert should have comment or be unexported (golint)
    • Line 99: warning: exported function ParsePEMEncodedPrivateKey should have comment or be unexported (golint)
    • Line 107: warning: exported function NewSignedCertificate should have comment or be unexported (golint)
    • bootkube/cmd/render/plugin/default/asset/k8s.go
    • Line 17: warning: comment on exported const EtcdServiceName should be of the form "EtcdServiceName ..." (golint)
    • Line 20: warning: exported const SecretEtcdPeer should have comment (or a comment on this block) or be unexported (golint)
    • Line 270: warning: exported function MustCreateAssetFromTemplate should have comment or be unexported (golint)
    • bootkube/cmd/render/plugin/default/asset/internal/templates.go
    • Line 4: warning: exported var AdminKubeConfigTemplate should have comment or be unexported (golint)
    • Line 24: warning: exported var KubeletKubeConfigTemplate should have comment or be unexported (golint)
    • Line 41: warning: exported var KubeletBootstrappingToken should have comment or be unexported (golint)
    • Line 111: warning: exported var KubeSystemSARoleBindingTemplate should have comment or be unexported (golint)
    • Line 125: warning: exported var APIServerTemplate should have comment or be unexported (golint)
    • Line 217: warning: exported var BootstrapAPIServerTemplate should have comment or be unexported (golint)
    • Line 279: warning: exported var CheckpointerTemplate should have comment or be unexported (golint)
    • Line 354: warning: exported var CheckpointerServiceAccount should have comment or be unexported (golint)
    • Line 361: warning: exported var CheckpointerRole should have comment or be unexported (golint)
    • Line 375: warning: exported var CheckpointerRoleBinding should have comment or be unexported (golint)
    • Line 390: warning: exported var CheckpointerClusterRole should have comment or be unexported (golint)
    • Line 400: warning: exported var CheckpointerClusterRoleBinding should have comment or be unexported (golint)
    • Line 414: warning: exported var ControllerManagerTemplate should have comment or be unexported (golint)
    • Line 504: warning: exported var ControllerManagerServiceAccount should have comment or be unexported (golint)
    • Line 511: warning: exported var ControllerManagerClusterRoleBinding should have comment or be unexported (golint)
    • Line 525: warning: exported var BootstrapControllerManagerTemplate should have comment or be unexported (golint)
    • Line 565: warning: exported var ControllerManagerDisruptionTemplate should have comment or be unexported (golint)
    • Line 578: warning: exported var SchedulerTemplate should have comment or be unexported (golint)
    • Line 638: warning: exported var BootstrapSchedulerTemplate should have comment or be unexported (golint)
    • Line 663: warning: exported var SchedulerDisruptionTemplate should have comment or be unexported (golint)
    • Line 676: warning: exported var ProxyTemplate should have comment or be unexported (golint)
    • Line 745: warning: exported var ProxyServiceAccount should have comment or be unexported (golint)
    • Line 752: warning: exported var ProxyClusterRoleBinding should have comment or be unexported (golint)
    • Line 766: warning: comment on exported var KubeConfigInClusterTemplate should be of the form "KubeConfigInClusterTemplate ..." (golint)
    • Line 798: warning: exported var CoreDNSClusterRoleBindingTemplate should have comment or be unexported (golint)
    • Line 816: warning: exported var CoreDNSClusterRoleTemplate should have comment or be unexported (golint)
    • Line 839: warning: exported var CoreDNSConfigTemplate should have comment or be unexported (golint)
    • Line 868: warning: exported var CoreDNSDeploymentTemplate should have comment or be unexported (golint)
    • Line 966: warning: exported var CoreDNSServiceAccountTemplate should have comment or be unexported (golint)
    • Line 975: warning: exported var CoreDNSSvcTemplate should have comment or be unexported (golint)
    • Line 1000: warning: exported var FlannelClusterRole should have comment or be unexported (golint)
    • Line 1026: warning: exported var FlannelClusterRoleBinding should have comment or be unexported (golint)
    • Line 1040: warning: exported var FlannelServiceAccount should have comment or be unexported (golint)
    • Line 1047: warning: exported var FlannelCfgTemplate should have comment or be unexported (golint)
    • Line 1086: warning: exported var FlannelTemplate should have comment or be unexported (golint)
    • Line 1171: warning: exported var CalicoCfgTemplate should have comment or be unexported (golint)
    • Line 1212: warning: exported var CalicoNodeTemplate should have comment or be unexported (golint)
    • Line 1340: warning: exported var CalicoPolicyOnlyTemplate should have comment or be unexported (golint)
    • Line 1463: warning: exported var CalicoGlobalNetworkPoliciesCRD should have comment or be unexported (golint)
    • Line 1478: warning: exported var CalicoIPPoolsCRD should have comment or be unexported (golint)
    • Line 1493: warning: exported var CalicoBGPConfigurationsCRD should have comment or be unexported (golint)
    • Line 1508: warning: exported var CalicoBGPPeersCRD should have comment or be unexported (golint)
    • Line 1523: warning: exported var CalicoFelixConfigurationsCRD should have comment or be unexported (golint)
    • Line 1538: warning: exported var CalicoGlobalNetworkSetsCRD should have comment or be unexported (golint)
    • Line 1553: warning: exported var CalicoNetworkPoliciesCRD should have comment or be unexported (golint)
    • Line 1568: warning: exported var CalicoClusterInformationsCRD should have comment or be unexported (golint)
    • Line 1583: warning: exported var CalicoServiceAccountTemplate should have comment or be unexported (golint)
    • Line 1590: warning: exported var CalicoRoleTemplate should have comment or be unexported (golint)
    • Line 1621: warning: exported var CalicoRoleBindingTemplate should have comment or be unexported (golint)
    • bootkube/pkg/bootkube/bootkube.go
    • Line 14: warning: exported type Config should have comment or be unexported (golint)
    • Line 28: warning: exported function NewBootkube should have comment or be unexported (golint)
    • Line 76: warning: comment on exported function UserOutput should be of the form "UserOutput ..." (golint)
    • bootkube/pkg/bootkube/status.go
    • Line 25: warning: exported function WaitUntilPodsRunning should have comment or be unexported (golint)
    • Line 53: warning: exported function NewStatusController should have comment or be unexported (golint)
    • bootkube/cmd/render/plugin/default/asset/asset.go
    • Line 21: warning: exported const AssetPathSecrets should have comment (or a comment on this block) or be unexported (golint)
    • Line 106: warning: exported var BootstrapSecretsDir should have comment or be unexported (golint)
    • Line 108: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 322: warning: exported type Asset should have comment or be unexported (golint)
    • Line 327: warning: exported type Assets should have comment or be unexported (golint)
    • Line 329: warning: exported method Assets.Get should have comment or be unexported (golint)
    • Line 338: warning: exported method Assets.WriteFiles should have comment or be unexported (golint)
    • Line 357: warning: exported method Asset.WriteFile should have comment or be unexported (golint)
    • bootkube/pkg/util/log.go
    • Line 12: warning: exported type GlogWriter should have comment or be unexported (golint)
    • Line 23: warning: exported function InitLogs should have comment or be unexported (golint)
    • Line 30: warning: exported function FlushLogs should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words

    • bootkube/pkg/bootkube/create.go
    • Line 47: warning: "creater" is a misspelling of "creature" (misspell)
    • Line 127: warning: "creater" is a misspelling of "creature" (misspell)
    • Line 136: warning: "creater" is a misspelling of "creature" (misspell)
    • Line 148: warning: "creater" is a misspelling of "creature" (misspell)
    • Line 155: warning: "creater" is a misspelling of "creature" (misspell)
    • Line 230: warning: "creater" is a misspelling of "creature" (misspell)
    • Line 276: warning: "creater" is a misspelling of "creature" (misspell)
    • Line 279: warning: "dicovery" is a misspelling of "discovery" (misspell)