Preparing report...

Report for github.com/reliablyhq/cli

A+    Excellent!    Found 67 issues across 136 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!


gocyclo99%

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.


golint50%

Golint is a linter for Go source code.

    • cli/core/workflows/workflow.go
    • Line 38: warning: comment on exported function GetWorkflow should be of the form "GetWorkflow ..." (golint)
    • Line 56: warning: comment on exported function GenerateWorkflow should be of the form "GenerateWorkflow ..." (golint)
    • Line 151: warning: comment on exported function CanEditWorkflowInPlace should be of the form "CanEditWorkflowInPlace ..." (golint)
    • cli/core/cli/question/question.go
    • Line 15: warning: exported type AskOpt should have comment or be unexported (golint)
    • Line 18: warning: exported var Required should have comment or be unexported (golint)
    • Line 26: warning: exported function WithStringAnswer should have comment or be unexported (golint)
    • Line 40: warning: exported function WithStringAnswerV2 should have comment or be unexported (golint)
    • Line 56: warning: exported function WithFloat64Answer should have comment or be unexported (golint)
    • Line 60: 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 76: warning: exported function WithInt64Answer should have comment or be unexported (golint)
    • Line 93: warning: exported function WithDurationAnswer should have comment or be unexported (golint)
    • Line 99: warning: exported type BoolAnswer should have comment or be unexported (golint)
    • Line 102: warning: exported const WithYesAsDefault should have comment (or a comment on this block) or be unexported (golint)
    • Line 106: warning: exported function WithBoolAnswer should have comment or be unexported (golint)
    • Line 125: warning: exported function WithSingleChoiceAnswer should have comment or be unexported (golint)
    • cli/core/color/color.go
    • Line 29: warning: comment on exported var BgYellow should be of the form "BgYellow ..." (golint)
    • Line 31: warning: exported var BgMagenta should have comment or be unexported (golint)
    • Line 37: warning: exported function IfTrueRed should have comment or be unexported (golint)
    • Line 45: warning: exported function IfTrueGreen should have comment or be unexported (golint)
    • Line 53: warning: exported function IfTrueMagenta should have comment or be unexported (golint)
    • Line 61: warning: exported function IfTrueCyan should have comment or be unexported (golint)
    • Line 69: warning: exported function IfTrueYellow should have comment or be unexported (golint)
    • Line 77: warning: exported function Is256ColorSupported should have comment or be unexported (golint)
    • cli/api/reports.go
    • Line 16: warning: exported function SendReport should have comment or be unexported (golint)
    • Line 37: warning: exported function GetReports should have comment or be unexported (golint)
    • cli/api/suggestion.go
    • Line 41: warning: exported type Execution should have comment or be unexported (golint)
    • Line 47: warning: exported type Suggestion should have comment or be unexported (golint)
    • Line 53: warning: exported type Page should have comment or be unexported (golint)
    • Line 58: warning: exported type SuggestionHistory should have comment or be unexported (golint)
    • Line 63: warning: exported function GetSuggestionHistory should have comment or be unexported (golint)
    • cli/cmd/reliably/slo/report/cmd.go
    • Line 29: warning: exported type Choice should have comment or be unexported (golint)
    • Line 31: warning: exported type ReportOutput should have comment or be unexported (golint)
    • Line 36: warning: exported type ReportOptions should have comment or be unexported (golint)
    • Line 57: warning: exported function NewCommand should have comment or be unexported (golint)
    • cli/cmd/reliably/history.go
    • Line 25: warning: exported const ResetLine should have comment or be unexported (golint)
    • Line 26: warning: exported const ClearPreviousLine should have comment or be unexported (golint)
    • Line 28: warning: exported type HistoryOptions should have comment or be unexported (golint)
    • Line 38: warning: exported function NewCmdHistory should have comment or be unexported (golint)
    • cli/core/metrics/aws/load_balancer.go
    • Line 15: warning: exported type ElasticLoadBalancer should have comment or be unexported (golint)
    • Line 17: warning: exported method ElasticLoadBalancer.Namespace should have comment or be unexported (golint)
    • Line 21: warning: exported method ElasticLoadBalancer.Dimension should have comment or be unexported (golint)
    • Line 34: warning: exported method ElasticLoadBalancer.GetErrorRateMetricDataInput should have comment or be unexported (golint)
    • Line 115: warning: exported method ElasticLoadBalancer.GetLatencyMetricDataInput should have comment or be unexported (golint)
    • Line 150: warning: exported method ElasticLoadBalancer.GetLatencyAboveThresholdPerMin should have comment or be unexported (golint)
    • cli/cmd/reliably/auth/auth_with_provider.go
    • Line 28: warning: exported type AuthProvider should have comment or be unexported (golint)
    • Line 31: warning: exported const AuthWithGithub should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported method AuthProvider.Scopes should have comment or be unexported (golint)
    • Line 66: warning: exported method AuthProvider.ClientID should have comment or be unexported (golint)
    • cli/core/manifest/load.go
    • Line 13: warning: exported const DefaultManifestPath should have comment or be unexported (golint)
    • Line 15: warning: exported function Load should have comment or be unexported (golint)
    • cli/core/policies/download.go
    • Line 15: warning: exported type Downloader should have comment or be unexported (golint)
    • Line 19: warning: exported type PolicyDownloader should have comment or be unexported (golint)
    • Line 23: warning: exported method PolicyDownloader.DownloadPolicy should have comment or be unexported (golint)
    • cli/core/metrics/aws/api_gateway.go
    • Line 15: warning: exported type ApiGateway should have comment or be unexported (golint)
    • Line 17: warning: exported method ApiGateway.Namespace should have comment or be unexported (golint)
    • Line 21: warning: exported method ApiGateway.Dimension should have comment or be unexported (golint)
    • Line 34: warning: exported method ApiGateway.GetErrorRateMetricDataInput should have comment or be unexported (golint)
    • Line 101: warning: exported method ApiGateway.GetLatencyMetricDataInput should have comment or be unexported (golint)
    • Line 136: warning: exported method ApiGateway.GetLatencyAboveThresholdPerMin should have comment or be unexported (golint)
    • cli/core/iostreams/iostreams.go
    • Line 25: warning: exported function UnknownIcon should have comment or be unexported (golint)
    • Line 29: warning: exported function WarningIcon should have comment or be unexported (golint)
    • Line 33: warning: exported type IOStreams should have comment or be unexported (golint)
    • Line 51: warning: exported method IOStreams.SetStdinTTY should have comment or be unexported (golint)
    • Line 56: warning: exported method IOStreams.IsStdinTTY should have comment or be unexported (golint)
    • Line 66: warning: exported method IOStreams.SetStdoutTTY should have comment or be unexported (golint)
    • Line 71: warning: exported method IOStreams.IsStdoutTTY should have comment or be unexported (golint)
    • Line 81: warning: exported method IOStreams.SetStderrTTY should have comment or be unexported (golint)
    • Line 86: warning: exported method IOStreams.IsStderrTTY should have comment or be unexported (golint)
    • Line 96: warning: exported method IOStreams.CanPrompt should have comment or be unexported (golint)
    • Line 104: warning: exported method IOStreams.SetNeverPrompt should have comment or be unexported (golint)
    • Line 108: warning: exported function System should have comment or be unexported (golint)
    • Line 139: warning: exported function Test should have comment or be unexported (golint)
    • Line 150: warning: exported method IOStreams.StartProgressIndicator should have comment or be unexported (golint)
    • Line 160: warning: exported method IOStreams.StopProgressIndicator should have comment or be unexported (golint)
    • Line 168: warning: exported method IOStreams.SetProgessMessage should have comment or be unexported (golint)
    • cli/cmd/reliably/root.go
    • Line 34: warning: exported type Choice should have comment or be unexported (golint)
    • Line 44: warning: exported function NewCmdRoot should have comment or be unexported (golint)
    • cli/core/workflows/gitlab.go
    • Line 12: warning: don't use underscores in Go names; const gitlab_Path should be gitlabPath (golint)
    • Line 14: warning: don't use underscores in Go names; var gitlab_Template should be gitlabTemplate (golint)
    • Line 37: warning: don't use underscores in Go names; var gitlab_AccessTokenHelp should be gitlabAccessTokenHelp (golint)
    • cli/core/manifest/types.go
    • Line 11: warning: exported type Manifest should have comment or be unexported (golint)
    • Line 28: warning: exported type Service should have comment or be unexported (golint)
    • Line 34: warning: exported type ServiceLevel should have comment or be unexported (golint)
    • Line 44: warning: exported type Criteria should have comment or be unexported (golint)
    • Line 47: warning: exported type LatencyCriteria should have comment or be unexported (golint)
    • Line 51: warning: exported type AvailabilityCriteria should have comment or be unexported (golint)
    • Line 59: warning: exported type ServiceLevelIndicator should have comment or be unexported (golint)
    • Line 105: warning: exported method ServiceLevel.UnmarshalYAML should have comment or be unexported (golint)
    • Line 144: warning: exported method ServiceLevel.UnmarshalJSON should have comment or be unexported (golint)
    • cli/core/update/udpate.go
    • Line 28: warning: exported type StateEntry should have comment or be unexported (golint)
    • Line 84: warning: exported function VersionGreaterThan should have comment or be unexported (golint)
    • Line 118: warning: exported function GetLatestRelease should have comment or be unexported (golint)
    • Line 132: warning: exported function GetLatestReleaseAsset should have comment or be unexported (golint)
    • Line 151: warning: exported function DownloadLatestReleaseAsset should have comment or be unexported (golint)
    • Line 173: warning: exported function GetRelease should have comment or be unexported (golint)
    • Line 188: warning: exported function GetReleaseAsset should have comment or be unexported (golint)
    • Line 207: warning: exported function DownloadReleaseAsset should have comment or be unexported (golint)
    • cli/core/terraform/types.go
    • Line 14: warning: exported type StateRepresentation should have comment or be unexported (golint)
    • Line 19: warning: exported type ConfigurationRepresentation should have comment or be unexported (golint)
    • Line 25: warning: exported type ModuleConfigRepresentation should have comment or be unexported (golint)
    • Line 48: warning: exported type ModuleCallsConfigRepresentation should have comment or be unexported (golint)
    • Line 56: warning: exported type ValuesRepresentation should have comment or be unexported (golint)
    • Line 61: warning: exported type ResourceChangeRepresentation should have comment or be unexported (golint)
    • Line 72: warning: exported type ChangeRepresentation should have comment or be unexported (golint)
    • Line 78: warning: exported type ValueRepresentation should have comment or be unexported (golint)
    • Line 83: warning: exported type ModuleRepresentation should have comment or be unexported (golint)
    • Line 88: warning: exported type ResourceRepresentation should have comment or be unexported (golint)
    • Line 99: warning: exported type ChildModuleRepresentation should have comment or be unexported (golint)
    • Line 105: warning: exported method ChildModuleRepresentation.ToModule should have comment or be unexported (golint)
    • Line 112: warning: exported type ProviderConfigRepresentation should have comment or be unexported (golint)
    • Line 119: warning: exported type ExpressionRepresentation should have comment or be unexported (golint)
    • Line 124: warning: exported type BlockExpressionRepresentation should have comment or be unexported (golint)
    • cli/core/report/report.go
    • Line 10: warning: exported type Report should have comment or be unexported (golint)
    • Line 16: warning: exported type Service should have comment or be unexported (golint)
    • Line 22: warning: exported type ServiceLevel should have comment or be unexported (golint)
    • Line 42: warning: exported type Window should have comment or be unexported (golint)
    • Line 47: warning: exported type ServiceLevelResult should have comment or be unexported (golint)
    • cli/core/workflows/github.go
    • Line 7: warning: don't use underscores in Go names; const github_Path should be githubPath (golint)
    • Line 9: warning: don't use underscores in Go names; var github_Template should be githubTemplate (golint)
    • Line 35: warning: don't use underscores in Go names; var github_AccessTokenSecretHelp should be githubAccessTokenSecretHelp (golint)
    • cli/core/models.go
    • Line 116: warning: comment on exported const Info should be of the form "Info ..." (golint)
    • Line 145: warning: exported method Level.ColoredString should have comment or be unexported (golint)
    • Line 200: warning: exported var LevelStringMap should have comment or be unexported (golint)
    • Line 206: warning: exported var Levels should have comment or be unexported (golint)
    • cli/utils/git.go
    • Line 15: warning: exported var GitCommand should have comment or be unexported (golint)
    • Line 64: warning: exported function GitRemoteOriginURL should have comment or be unexported (golint)
    • Line 105: warning: exported type GitRemoteURL should have comment or be unexported (golint)
    • Line 171: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • cli/core/auth.go
    • Line 8: warning: exported const RELIABLY_TOKEN should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: exported function AuthTokenFromEnv should have comment or be unexported (golint)
    • Line 15: warning: exported function AuthTokenProvidedFromEnv should have comment or be unexported (golint)
    • cli/core/metrics/gcp/gcp.go
    • Line 17: warning: exported type GCP should have comment or be unexported (golint)
    • Line 97: warning: exported method GCP.GetLatencyAboveThresholdPercentage should have comment or be unexported (golint)
    • Line 203: warning: exported method GCP.GetAvailabilityPercentage should have comment or be unexported (golint)
    • cli/cmd/reliably/worklow.go
    • Line 19: warning: exported type WorkflowOptions should have comment or be unexported (golint)
    • Line 32: warning: exported function NewCmdWorkflow should have comment or be unexported (golint)
    • cli/api/user.go
    • Line 7: warning: exported type UserInfo should have comment or be unexported (golint)
    • Line 15: warning: exported function CurrentUser should have comment or be unexported (golint)
    • Line 21: warning: exported function CurrentUsername should have comment or be unexported (golint)
    • Line 31: warning: exported function CurrentUserID should have comment or be unexported (golint)
    • cli/utils/terminal.go
    • Line 11: warning: exported var IsTerminal should have comment or be unexported (golint)
    • Line 15: warning: exported function IsCygwinTerminal should have comment or be unexported (golint)
    • Line 19: warning: exported var TerminalSize should have comment or be unexported (golint)
    • cli/core/duration.go
    • Line 15: warning: comment on exported type Duration should be of the form "Duration ..." (with optional leading article) (golint)
    • Line 20: warning: exported method Duration.MarshalJSON should have comment or be unexported (golint)
    • Line 25: warning: exported method Duration.UnmarshalJSON should have comment or be unexported (golint)
    • Line 50: warning: exported method Duration.MarshalYAML should have comment or be unexported (golint)
    • Line 54: warning: exported method Duration.UnmarshalYAML should have comment or be unexported (golint)
    • Line 81: warning: comment on exported type Iso8601Duration should be of the form "Iso8601Duration ..." (with optional leading article) (golint)
    • Line 90: warning: exported method Iso8601Duration.ToDuration should have comment or be unexported (golint)
    • Line 94: warning: exported method Iso8601Duration.MarshalJSON should have comment or be unexported (golint)
    • Line 99: warning: exported method Iso8601Duration.UnmarshalJSON should have comment or be unexported (golint)
    • Line 120: warning: exported method Iso8601Duration.MarshalYAML should have comment or be unexported (golint)
    • Line 124: warning: exported method Iso8601Duration.UnmarshalYAML should have comment or be unexported (golint)
    • Line 153: warning: comment on exported function HumanizeDurationShort should be of the form "HumanizeDurationShort ..." (golint)
    • cli/core/kubernetes/kubernetes.go
    • Line 1: warning: package comment should be of the form "Package kubernetes ..." (golint)
    • Line 47: warning: exported type KubernetesAPI should have comment or be unexported (golint)
    • Line 68: warning: exported method KubernetesAPI.URI should have comment or be unexported (golint)
    • Line 106: warning: exported function GetHeaderInfo should have comment or be unexported (golint)
    • Line 314: warning: exported function GetResourceList should have comment or be unexported (golint)
    • cli/core/config.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 11: warning: exported function ConfigDir should have comment or be unexported (golint)
    • Line 16: warning: exported function ConfigFile should have comment or be unexported (golint)
    • cli/core/metrics/provider.go
    • Line 10: warning: exported var ProviderFactories should have comment or be unexported (golint)
    • Line 16: warning: exported type ProviderFactory should have comment or be unexported (golint)
    • Line 18: warning: exported type Provider should have comment or be unexported (golint)
    • cli/core/workflows/circleci.go
    • Line 9: warning: don't use underscores in Go names; const circleci_Path should be circleciPath (golint)
    • Line 11: warning: don't use underscores in Go names; var circleci_Template should be circleciTemplate (golint)
    • Line 31: warning: don't use underscores in Go names; var circleci_AccessTokenHelp should be circleciAccessTokenHelp (golint)
    • cli/core/policies/registry.go
    • Line 3: warning: exported type PolicyRegistry should have comment or be unexported (golint)
    • Line 8: warning: exported method PolicyRegistry.GetPolicy should have comment or be unexported (golint)
    • Line 36: warning: exported method PolicyRegistry.ListPolicies should have comment or be unexported (golint)
    • Line 60: warning: exported type RegistryOption should have comment or be unexported (golint)
    • Line 63: warning: exported var MemStore should have comment or be unexported (golint)
    • cli/cmd/reliably/update.go
    • Line 27: warning: exported type UpdateOptions should have comment or be unexported (golint)
    • Line 35: warning: exported function NewCmdUpdate should have comment or be unexported (golint)
    • cli/core/metrics/aws/aws.go
    • Line 18: warning: exported type AwsCloudWatch should have comment or be unexported (golint)
    • Line 20: warning: exported type AwsMetricsProvider should have comment or be unexported (golint)
    • Line 28: warning: exported type AwsResource should have comment or be unexported (golint)
    • Line 32: warning: exported type AwsCloudWatchClient should have comment or be unexported (golint)
    • Line 72: warning: comment on exported method AwsCloudWatch.Close should be of the form "Close ..." (golint)
    • Line 78: warning: exported method AwsCloudWatch.GetLatencyAboveThresholdPercentage should have comment or be unexported (golint)
    • Line 129: warning: exported method AwsCloudWatch.Get99PercentLatencyMetricForResource should have comment or be unexported (golint)
    • Line 184: warning: exported method AwsCloudWatch.GetErrorPercentageMetricForResource should have comment or be unexported (golint)
    • Line 233: warning: exported method AwsCloudWatch.GetAvailabilityPercentage should have comment or be unexported (golint)
    • Line 277: warning: exported method AwsResource.MetricProvider should have comment or be unexported (golint)
    • cli/core/context/context.go
    • Line 264: warning: exported type SourceType should have comment or be unexported (golint)
    • Line 273: warning: exported var SourceTypeToString should have comment or be unexported (golint)
    • Line 287: warning: exported method SourceType.MarshalJSON should have comment or be unexported (golint)
    • Line 294: warning: exported type SourceMeta should have comment or be unexported (golint)
    • Line 396: warning: exported function NewGitSource 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!