Preparing report...

Report for github.com/timescale/tobs

A    Great!    Found 57 issues across 85 files

Tweet

gofmt90%

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!


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.

    • tobs/cli/cmd/upgrade/upgrade.go
    • Line 56: warning: cyclomatic complexity 30 of function upgradeTobs() is high (> 15) (gocyclo)
    • Line 217: warning: cyclomatic complexity 21 of function (*upgradeSpec).UpgradePathBasedOnVersion() is high (> 15) (gocyclo)
    • tobs/cli/cmd/install/install.go
    • Line 140: warning: cyclomatic complexity 33 of function (*InstallSpec).InstallStack() is high (> 15) (gocyclo)
    • Line 62: warning: cyclomatic complexity 22 of function helmInstall() is high (> 15) (gocyclo)

golint36%

Golint is a linter for Go source code.

    • tobs/cli/pkg/timescaledb_secrets/create.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 23: warning: exported type TSDBSecretsInfo should have comment or be unexported (golint)
    • Line 32: warning: exported method TSDBSecretsInfo.CreateTimescaleDBSecrets should have comment or be unexported (golint)
    • tobs/cli/pkg/k8s/client_impl.go
    • Line 35: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 44: warning: exported var HOME should have comment or be unexported (golint)
    • Line 55: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 75: warning: exported function NewAPIClient should have comment or be unexported (golint)
    • Line 437: warning: exported type PVCData should have comment or be unexported (golint)
    • tobs/cli/cmd/root.go
    • Line 13: warning: exported var Namespace should have comment or be unexported (golint)
    • Line 14: warning: exported var HelmReleaseName should have comment or be unexported (golint)
    • Line 50: warning: exported function AddRootFlags should have comment or be unexported (golint)
    • tobs/cli/pkg/helm/helper.go
    • Line 7: warning: exported type ChartMetadata should have comment or be unexported (golint)
    • Line 22: warning: exported type DeployedChartMetadata should have comment or be unexported (golint)
    • Line 33: warning: comment on exported function FetchValue should be of the form "FetchValue ..." (golint)
    • tobs/cli/pkg/utils/utils.go
    • Line 13: warning: exported const REPO_LOCATION should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: don't use underscores in Go names; const UpgradeJob_040 should be UpgradeJob040 (golint)
    • Line 18: warning: don't use underscores in Go names; const Version_040 should be Version040 (golint)
    • Line 21: warning: exported function ErrorTobsDeploymentNotFound should have comment or be unexported (golint)
    • Line 25: warning: exported function ParseVersion should have comment or be unexported (golint)
    • Line 40: warning: exported function ConfirmAction should have comment or be unexported (golint)
    • Line 51: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 57: warning: exported function GetTimescaleDBURI should have comment or be unexported (golint)
    • Line 69: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 79: warning: exported function GetDBPassword should have comment or be unexported (golint)
    • Line 92: warning: exported function GetTimescaleDBsecretLabels should have comment or be unexported (golint)
    • tobs/cli/cmd/common/common.go
    • Line 14: warning: exported const LISTEN_PORT_GRAFANA should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported var TimescaleDBBackUpKeyForValuesYaml should have comment or be unexported (golint)
    • Line 36: warning: exported function GetSuperuserDBDetails should have comment or be unexported (golint)
    • Line 107: warning: exported function GetTimescaleDBLabels should have comment or be unexported (golint)
    • tobs/cli/tests/test-utils/common_utils.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 13: warning: exported var PATH_TO_TOBS should have comment or be unexported (golint)
    • Line 15: warning: exported type ReleaseInfo should have comment or be unexported (golint)
    • Line 20: warning: exported method ReleaseInfo.TestTimescaleGetPassword should have comment or be unexported (golint)
    • Line 32: warning: exported method ReleaseInfo.TestTimescaleChangePassword should have comment or be unexported (golint)
    • Line 44: warning: exported method ReleaseInfo.VerifyTimescalePassword should have comment or be unexported (golint)
    • Line 58: warning: exported method ReleaseInfo.TestTimescalePortForward should have comment or be unexported (golint)
    • Line 88: warning: exported method ReleaseInfo.TestTimescaleConnect should have comment or be unexported (golint)
    • Line 110: warning: exported method ReleaseInfo.TestTimescaleSuperUserConnect should have comment or be unexported (golint)
    • Line 132: warning: exported method ReleaseInfo.TestPromscalePortForward should have comment or be unexported (golint)
    • Line 164: warning: exported function PortForwardPromscale should have comment or be unexported (golint)
    • Line 183: warning: exported method TestUnInstallSpec.TestUninstall should have comment or be unexported (golint)
    • Line 199: warning: exported type TestInstallSpec should have comment or be unexported (golint)
    • Line 209: warning: exported type TestUnInstallSpec should have comment or be unexported (golint)
    • Line 215: warning: exported method TestInstallSpec.TestInstall should have comment or be unexported (golint)
    • Line 240: warning: exported function ShowAllPods should have comment or be unexported (golint)
    • Line 249: warning: exported function ShowAllPVCs should have comment or be unexported (golint)
    • tobs/cli/pkg/pgconn/connection.go
    • Line 16: warning: exported type DBDetails should have comment or be unexported (golint)
    • Line 26: warning: exported method DBDetails.OpenConnectionToDB should have comment or be unexported (golint)
    • Line 103: warning: exported function UpdatePasswordInDBURI should have comment or be unexported (golint)
    • Line 124: warning: exported function ParseDBURI should have comment or be unexported (golint)
    • tobs/cli/tests/test-utils/k8s_utils.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 24: warning: exported var HOME should have comment or be unexported (golint)
    • Line 44: warning: comment on exported function UpdateStorageClassAllowVolumeExpand should be of the form "UpdateStorageClassAllowVolumeExpand ..." (golint)
    • Line 63: warning: exported function GetAllPVCSizes should have comment or be unexported (golint)
    • Line 77: warning: exported function GetUpdatedPromscaleMemResource should have comment or be unexported (golint)
    • Line 87: warning: exported function CheckPodsRunning should have comment or be unexported (golint)
    • Line 111: warning: exported function CheckPVCSExist should have comment or be unexported (golint)
    • Line 132: warning: exported function CreateTimescaleDBNodePortService should have comment or be unexported (golint)
    • Line 174: warning: exported function GetTSDBBackUpSecret should have comment or be unexported (golint)
    • Line 183: warning: exported function DeleteNamespace should have comment or be unexported (golint)
    • Line 192: warning: exported function DeletePod should have comment or be unexported (golint)
    • Line 198: warning: exported function DeleteWebhooks should have comment or be unexported (golint)
    • tobs/cli/cmd/upgrade/upgrade.go
    • Line 115: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 476: warning: exported var KubePrometheusCRDVersion should have comment or be unexported (golint)
    • tobs/cli/pkg/otel/otel-utilities.go
    • Line 19: warning: exported const CertManagerVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported var CertManagerManifests should have comment or be unexported (golint)
    • Line 32: warning: exported type OtelCol should have comment or be unexported (golint)
    • Line 39: warning: exported function CreateCertManager should have comment or be unexported (golint)
    • Line 96: warning: exported function DeleteOtelColCRD should have comment or be unexported (golint)
    • Line 105: warning: exported method OtelCol.IsCertManagerInstalledByTobs should have comment or be unexported (golint)
    • Line 119: warning: exported method OtelCol.CreateDefaultCollector should have comment or be unexported (golint)
    • Line 155: warning: exported method OtelCol.DeleteDefaultOtelCollector should have comment or be unexported (golint)
    • Line 159: warning: exported method OtelCol.IsOtelOperatorEnabledInRelease should have comment or be unexported (golint)
    • tobs/cli/pkg/helm/client_impl.go
    • Line 47: warning: comment on exported type ClientOptions should be of the form "ClientOptions ..." (with optional leading article) (golint)
    • Line 57: warning: exported function NewClient 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!