Preparing report...

Report for github.com/scaleway/scaleway-cli

A+    Excellent!    Found 80 issues across 243 files

Tweet

gofmt99%

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!


gocyclo93%

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.


golint69%

Golint is a linter for Go source code.

    • scaleway-cli/internal/interactive/print.go
    • Line 12: warning: exported function Print should have comment or be unexported (golint)
    • Line 19: warning: exported function Println should have comment or be unexported (golint)
    • Line 26: warning: exported function PrintlnWithoutIndent should have comment or be unexported (golint)
    • Line 33: warning: exported function Printf should have comment or be unexported (golint)
    • Line 40: warning: exported function Line should have comment or be unexported (golint)
    • Line 44: warning: exported function Center should have comment or be unexported (golint)
    • Line 53: warning: exported function Indent should have comment or be unexported (golint)
    • Line 64: warning: exported function RemoveIndent should have comment or be unexported (golint)
    • scaleway-cli/internal/core/result.go
    • Line 16: warning: exported type SuccessResult should have comment or be unexported (golint)
    • Line 24: warning: comment on exported type RawResult should be of the form "RawResult ..." (with optional leading article) (golint)
    • Line 32: warning: exported method SuccessResult.MarshalHuman should have comment or be unexported (golint)
    • Line 51: warning: exported method SuccessResult.MarshalJSON should have comment or be unexported (golint)
    • Line 78: warning: exported type MultiResults should have comment or be unexported (golint)
    • Line 80: warning: exported method MultiResults.MarshalHuman should have comment or be unexported (golint)
    • scaleway-cli/internal/qa/qa.go
    • Line 11: warning: exported function LintCommands should have comment or be unexported (golint)
    • Line 28: warning: exported type ShortMustNotEndWithDotError should have comment or be unexported (golint)
    • Line 48: warning: exported type ShortMustBePresentError should have comment or be unexported (golint)
    • Line 68: warning: exported type WellKnownArgOrderError should have comment or be unexported (golint)
    • Line 77: warning: exported type WellKnownArgAtTheEndError should have comment or be unexported (golint)
    • Line 146: warning: exported type ArgMustUseDashError should have comment or be unexported (golint)
    • Line 170: warning: exported type PositionalArgMustBeRequiredError should have comment or be unexported (golint)
    • Line 194: warning: exported type ExampleCanHaveOnlyOneTypeOfExampleError should have comment or be unexported (golint)
    • Line 218: warning: exported type DifferentLocalizationForNamespaceError should have comment or be unexported (golint)
    • Line 296: warning: exported type DuplicatedCommandError should have comment or be unexported (golint)
    • Line 323: warning: exported type MissingExampleError should have comment or be unexported (golint)
    • scaleway-cli/internal/core/testing.go
    • Line 91: warning: exported function BeforeFuncStoreInMeta should have comment or be unexported (golint)
    • Line 101: warning: exported type BeforeFunc should have comment or be unexported (golint)
    • Line 103: warning: exported type AfterFunc should have comment or be unexported (golint)
    • Line 105: warning: exported type ExecFuncCtx should have comment or be unexported (golint)
    • Line 111: warning: exported type OverrideExecTestFunc should have comment or be unexported (golint)
    • Line 113: warning: exported type BeforeFuncCtx should have comment or be unexported (golint)
    • Line 122: warning: exported type AfterFuncCtx should have comment or be unexported (golint)
    • Line 274: warning: comment on exported function Test should be of the form "Test ..." (golint)
    • Line 500: warning: exported function BeforeFuncWhenUpdatingCassette should have comment or be unexported (golint)
    • Line 533: warning: exported function BeforeFuncOsExec should have comment or be unexported (golint)
    • Line 608: warning: exported function OverrideExecSimple should have comment or be unexported (golint)
    • scaleway-cli/internal/core/autocomplete.go
    • Line 28: warning: exported type AutoCompleteNodeType should have comment or be unexported (golint)
    • Line 31: warning: exported const AutoCompleteNodeTypeCommand should have comment (or a comment on this block) or be unexported (golint)
    • Line 54: warning: exported type FlagSpec should have comment or be unexported (golint)
    • Line 115: warning: comment on exported function NewAutoCompleteArgNode should be of the form "NewAutoCompleteArgNode ..." (golint)
    • Line 126: warning: comment on exported function NewAutoCompleteFlagNode should be of the form "NewAutoCompleteFlagNode ..." (golint)
    • scaleway-cli/internal/terminal/terminal.go
    • Line 10: warning: exported function Style should have comment or be unexported (golint)
    • Line 14: warning: exported function GetWidth should have comment or be unexported (golint)
    • Line 22: warning: exported function GetHeight should have comment or be unexported (golint)
    • scaleway-cli/internal/interactive/error.go
    • Line 3: warning: exported type InterruptError should have comment or be unexported (golint)
    • Line 5: warning: exported method InterruptError.MarshalHuman should have comment or be unexported (golint)
    • Line 13: warning: exported type EOFError should have comment or be unexported (golint)
    • scaleway-cli/internal/core/context.go
    • Line 52: warning: exported function ExtractCommands should have comment or be unexported (golint)
    • Line 56: warning: exported function GetOrganizationIDFromContext should have comment or be unexported (golint)
    • Line 65: warning: exported function GetProjectIDFromContext should have comment or be unexported (golint)
    • Line 74: warning: exported function ExtractClient should have comment or be unexported (golint)
    • Line 78: warning: exported function ExtractLogger should have comment or be unexported (golint)
    • Line 82: warning: exported function ExtractBuildInfo should have comment or be unexported (golint)
    • Line 86: warning: exported function ExtractEnv should have comment or be unexported (golint)
    • Line 100: warning: exported function ExtractUserHomeDir should have comment or be unexported (golint)
    • Line 104: warning: exported function ExtractCacheDir should have comment or be unexported (golint)
    • Line 112: warning: exported function ExtractBinaryName should have comment or be unexported (golint)
    • Line 116: warning: exported function ExtractStdin should have comment or be unexported (golint)
    • Line 120: warning: exported function ExtractProfileName should have comment or be unexported (golint)
    • Line 142: warning: exported function ExtractHTTPClient should have comment or be unexported (golint)
    • Line 146: warning: exported function ExtractConfigPath should have comment or be unexported (golint)
    • Line 158: warning: exported function ReloadClient should have comment or be unexported (golint)
    • Line 170: warning: exported function ExtractConfigPathFlag should have comment or be unexported (golint)
    • Line 174: warning: exported function ExtractProfileFlag should have comment or be unexported (golint)
    • scaleway-cli/internal/account/account.go
    • Line 22: warning: exported type LoginResponse should have comment or be unexported (golint)
    • Line 28: warning: exported type LoginRequest should have comment or be unexported (golint)
    • Line 76: warning: exported function GetAPIKey should have comment or be unexported (golint)
    • scaleway-cli/internal/human/marshal_func.go
    • Line 18: warning: exported type MarshalerFunc should have comment or be unexported (golint)
    • Line 122: warning: comment on exported function RegisterMarshalerFunc should be of the form "RegisterMarshalerFunc ..." (golint)
    • Line 180: warning: exported type EnumMarshalSpecs should have comment or be unexported (golint)
    • scaleway-cli/internal/args/unmarshal.go
    • Line 22: warning: exported type Unmarshaler should have comment or be unexported (golint)
    • Line 26: warning: exported type UnmarshalFunc should have comment or be unexported (golint)
    • Line 28: warning: exported var TestForceNow should have comment or be unexported (golint)
    • scaleway-cli/internal/core/arg_specs.go
    • Line 12: warning: exported type ArgSpecs should have comment or be unexported (golint)
    • Line 14: warning: exported method ArgSpecs.GetPositionalArg should have comment or be unexported (golint)
    • Line 38: warning: exported method ArgSpecs.GetByName should have comment or be unexported (golint)
    • Line 47: warning: exported method ArgSpecs.DeleteByName should have comment or be unexported (golint)
    • Line 57: warning: exported method ArgSpecs.AddBefore should have comment or be unexported (golint)
    • Line 71: warning: exported type ArgSpec should have comment or be unexported (golint)
    • Line 104: warning: exported method ArgSpec.Prefix should have comment or be unexported (golint)
    • Line 108: warning: exported method ArgSpec.IsPartOfMapOrSlice should have comment or be unexported (golint)
    • Line 112: warning: exported method ArgSpec.ConflictWith should have comment or be unexported (golint)
    • Line 117: warning: exported type DefaultFunc should have comment or be unexported (golint)
    • Line 119: warning: exported function ZoneArgSpec should have comment or be unexported (golint)
    • Line 145: warning: exported function RegionArgSpec should have comment or be unexported (golint)
    • Line 171: warning: exported function ProjectIDArgSpec should have comment or be unexported (golint)
    • Line 179: warning: exported function ProjectArgSpec should have comment or be unexported (golint)
    • Line 187: warning: exported function OrganizationArgSpec should have comment or be unexported (golint)
    • Line 195: warning: exported function OrganizationIDArgSpec should have comment or be unexported (golint)
    • scaleway-cli/internal/core/errors.go
    • Line 7: warning: exported function MissingRequiredArgumentError should have comment or be unexported (golint)
    • Line 13: warning: exported function InvalidValueForEnumError should have comment or be unexported (golint)
    • Line 20: warning: exported function InvalidSecretKeyError should have comment or be unexported (golint)
    • Line 26: warning: exported function InvalidAccessKeyError should have comment or be unexported (golint)
    • Line 33: warning: exported function InvalidOrganizationIDError should have comment or be unexported (golint)
    • Line 40: warning: exported function InvalidProjectIDError should have comment or be unexported (golint)
    • Line 47: warning: exported function ArgumentConflictError should have comment or be unexported (golint)
    • Line 53: warning: exported function WindowIsNotSupportedError should have comment or be unexported (golint)
    • scaleway-cli/internal/tabwriter/tabwriter.go
    • Line 202: warning: comment on exported const ANSISGRStartCharacter should be of the form "ANSISGRStartCharacter ..." (golint)
    • Line 207: warning: exported const ANSISGREndCharacter should have comment (or a comment on this block) or be unexported (golint)
    • Line 210: warning: comment on exported method Writer.Init should be of the form "Init ..." (golint)
    • Line 437: warning: comment on exported const Escape should be of the form "Escape ..." (golint)
    • scaleway-cli/internal/args/errors.go
    • Line 13: warning: exported type DataMustBeAPointerError should have comment or be unexported (golint)
    • Line 24: warning: exported type DataMustBeAMarshalableValueError should have comment or be unexported (golint)
    • Line 31: warning: exported type ValueIsNotMarshalableError should have comment or be unexported (golint)
    • Line 39: warning: exported type NotMarshalableTypeError should have comment or be unexported (golint)
    • Line 51: warning: exported type UnmarshalArgError should have comment or be unexported (golint)
    • Line 74: warning: exported type InvalidArgNameError should have comment or be unexported (golint)
    • Line 81: warning: exported type UnknownArgError should have comment or be unexported (golint)
    • Line 88: warning: exported type DuplicateArgError should have comment or be unexported (golint)
    • Line 95: warning: exported type CannotSetNestedFieldError should have comment or be unexported (golint)
    • Line 103: warning: exported type MissingIndexOnArrayError should have comment or be unexported (golint)
    • Line 110: warning: exported type InvalidIndexError should have comment or be unexported (golint)
    • Line 118: warning: exported type MissingIndicesInArrayError should have comment or be unexported (golint)
    • Line 132: warning: exported type MissingMapKeyError should have comment or be unexported (golint)
    • Line 139: warning: exported type MissingStructFieldError should have comment or be unexported (golint)
    • Line 147: warning: exported type UnmarshalableTypeError should have comment or be unexported (golint)
    • Line 155: warning: exported type CannotUnmarshalError should have comment or be unexported (golint)
    • Line 191: warning: exported type CannotParseDateError should have comment or be unexported (golint)
    • Line 201: warning: exported type CannotParseBoolError should have comment or be unexported (golint)
    • scaleway-cli/internal/core/logger.go
    • Line 10: warning: exported type Logger should have comment or be unexported (golint)
    • Line 15: warning: exported method Logger.Debugf should have comment or be unexported (golint)
    • Line 21: warning: exported method Logger.Infof should have comment or be unexported (golint)
    • Line 27: warning: exported method Logger.Warningf should have comment or be unexported (golint)
    • Line 33: warning: exported method Logger.Errorf should have comment or be unexported (golint)
    • Line 39: warning: exported method Logger.Debug should have comment or be unexported (golint)
    • Line 45: warning: exported method Logger.Info should have comment or be unexported (golint)
    • Line 51: warning: exported method Logger.Warning should have comment or be unexported (golint)
    • Line 63: warning: exported method Logger.ShouldLog should have comment or be unexported (golint)
    • scaleway-cli/internal/core/printer.go
    • Line 16: warning: comment on exported type PrinterType should be of the form "PrinterType ..." (with optional leading article) (golint)
    • Line 36: warning: comment on exported const PrinterOptJSONPretty should be of the form "PrinterOptJSONPretty ..." (golint)
    • Line 40: warning: exported type PrinterConfig should have comment or be unexported (golint)
    • Line 123: warning: exported type Printer should have comment or be unexported (golint)
    • Line 138: warning: exported method Printer.Print should have comment or be unexported (golint)
    • scaleway-cli/internal/core/build_info.go
    • Line 17: warning: exported type BuildInfo should have comment or be unexported (golint)
    • Line 27: warning: exported method BuildInfo.MarshalJSON should have comment or be unexported (golint)
    • Line 52: warning: exported method BuildInfo.GetUserAgent should have comment or be unexported (golint)
    • scaleway-cli/internal/interactive/prompt.go
    • Line 14: warning: exported type PromptPasswordConfig should have comment or be unexported (golint)
    • Line 19: warning: exported function PromptPasswordWithConfig should have comment or be unexported (golint)
    • Line 27: warning: exported type PromptBoolConfig should have comment or be unexported (golint)
    • Line 33: warning: exported function PromptBoolWithConfig should have comment or be unexported (golint)
    • Line 62: warning: exported type PromptStringConfig should have comment or be unexported (golint)
    • Line 70: warning: exported function PromptStringWithConfig should have comment or be unexported (golint)
    • Line 92: warning: exported type ReadlineHandler should have comment or be unexported (golint)
    • Line 96: warning: exported method ReadlineHandler.SetPrompt should have comment or be unexported (golint)
    • Line 100: warning: exported type ReadlineConfig should have comment or be unexported (golint)
    • Line 109: warning: exported function Readline should have comment or be unexported (golint)
    • scaleway-cli/internal/args/args.go
    • Line 46: warning: comment on exported function SplitRawMap should be of the form "SplitRawMap ..." (golint)
    • Line 78: warning: exported method RawArgs.GetPositionalArgs should have comment or be unexported (golint)
    • Line 88: warning: exported method RawArgs.Get should have comment or be unexported (golint)
    • Line 103: warning: exported method RawArgs.GetAll should have comment or be unexported (golint)
    • Line 148: warning: exported method RawArgs.Has should have comment or be unexported (golint)
    • Line 152: warning: exported method RawArgs.RemoveAllPositional should have comment or be unexported (golint)
    • Line 158: warning: exported method RawArgs.Add should have comment or be unexported (golint)
    • Line 162: warning: exported method RawArgs.Remove should have comment or be unexported (golint)
    • Line 179: warning: exported method RawArgs.GetSliceOrMapKeys should have comment or be unexported (golint)
    • Line 206: warning: comment on exported function GetArgType should be of the form "GetArgType ..." (golint)
    • scaleway-cli/internal/core/command.go
    • Line 111: warning: exported method Command.GetCommandLine should have comment or be unexported (golint)
    • Line 115: warning: exported method Command.GetUsage should have comment or be unexported (golint)
    • Line 163: warning: exported function NewCommands should have comment or be unexported (golint)
    • Line 176: warning: exported method Commands.MustFind should have comment or be unexported (golint)
    • Line 185: warning: exported method Commands.Add should have comment or be unexported (golint)
    • Line 190: warning: exported method Commands.Merge should have comment or be unexported (golint)
    • Line 196: warning: exported method Commands.GetAll should have comment or be unexported (golint)
    • Line 220: warning: exported method Commands.HasSubCommands should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words