paraglider-project / paraglider

Streamlining cloud networking
https://paragliderproject.io
Apache License 2.0
61 stars 4 forks source link

Fix linter errors in cli(internal) package #376

Open praveingk opened 5 months ago

praveingk commented 5 months ago

Steps to reproduce: 1) Replace .golangci.yml to this version 2) Run golangci-lint run --config=./.golangci.yaml ./internal/...

internal/cli/common/version.go:31:34: unused-parameter: parameter 'args' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/namespace/get/get.go:29:36: unexported-return: exported func NewCommand returns unexported type *get.executor, which can be annoying to use (revive)
internal/cli/glide/namespace/get/get.go:51:29: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/namespace/get/get.go:55:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/namespace/list/list.go:30:36: unexported-return: exported func NewCommand returns unexported type *list.executor, which can be annoying to use (revive)
internal/cli/glide/namespace/list/list.go:52:29: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/namespace/list/list.go:56:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/namespace/set/set.go:30:36: unexported-return: exported func NewCommand returns unexported type *set.executor, which can be annoying to use (revive)
internal/cli/glide/namespace/set/set.go:52:29: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/namespace/set/set.go:68:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/resource/create/create.go:31:36: unexported-return: exported func NewCommand returns unexported type *create.executor, which can be annoying to use (revive)
internal/cli/glide/resource/create/create.go:75:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/resource/create/create.go:85: line is 134 characters (lll)
internal/cli/glide/root.go:56:19: comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
internal/cli/glide/root.go:58:3: exitAfterDefer: os.Exit will exit, and `defer cancel()` will not run (gocritic)
internal/cli/glide/rule/add/add.go:32:36: unexported-return: exported func NewCommand returns unexported type *add.executor, which can be annoying to use (revive)
internal/cli/glide/rule/add/add.go:60:49: unused-parameter: parameter 'args' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/rule/add/add.go:77:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/rule/add/add.go:99:3: appendCombine: can combine chain of 2 appends into one (gocritic)
internal/cli/glide/rule/add/add.go:100: line is 163 characters (lll)
internal/cli/glide/rule/add/add.go:105:3: appendCombine: can combine chain of 2 appends into one (gocritic)
internal/cli/glide/rule/add/add.go:106: line is 161 characters (lll)
internal/cli/glide/rule/delete/delete.go:17:9: package name delete has same name as predeclared identifier (predeclared)
internal/cli/glide/rule/delete/delete.go:29:36: unexported-return: exported func NewCommand returns unexported type *delete.executor, which can be annoying to use (revive)
internal/cli/glide/rule/delete/delete.go:53:49: unused-parameter: parameter 'args' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/rule/delete/delete.go:62:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/rule/get/get.go:30:36: unexported-return: exported func NewCommand returns unexported type *get.executor, which can be annoying to use (revive)
internal/cli/glide/rule/get/get.go:52:29: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/rule/get/get.go:56:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/server/get/get.go:30:36: unexported-return: exported func NewCommand returns unexported type *get.executor, which can be annoying to use (revive)
internal/cli/glide/server/get/get.go:52:29: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/server/get/get.go:56:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/server/set/set.go:28:36: unexported-return: exported func NewCommand returns unexported type *set.executor, which can be annoying to use (revive)
internal/cli/glide/server/set/set.go:50:29: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/server/set/set.go:55:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/settings/settings.go:19:12: var-declaration: should omit type CLISettings from declaration of var Global; it will be inferred from the right-hand side (revive)
internal/cli/glide/tag/delete/delete.go:17:9: package name delete has same name as predeclared identifier (predeclared)
internal/cli/glide/tag/delete/delete.go:29:36: unexported-return: exported func NewCommand returns unexported type *delete.executor, which can be annoying to use (revive)
internal/cli/glide/tag/delete/delete.go:53:49: unused-parameter: parameter 'args' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/tag/delete/delete.go:62:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/tag/delete/delete.go:68:9: indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)
internal/cli/glide/tag/get/get.go:30:36: unexported-return: exported func NewCommand returns unexported type *get.executor, which can be annoying to use (revive)
internal/cli/glide/tag/get/get.go:54:49: unused-parameter: parameter 'args' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/tag/get/get.go:63:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/tag/list/list.go:30:36: unexported-return: exported func NewCommand returns unexported type *list.executor, which can be annoying to use (revive)
internal/cli/glide/tag/list/list.go:47:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/tag/set/set.go:31:36: unexported-return: exported func NewCommand returns unexported type *set.executor, which can be annoying to use (revive)
internal/cli/glide/tag/set/set.go:55:49: unused-parameter: parameter 'args' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glide/tag/set/set.go:82:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glided/az/az.go:44:29: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glided/az/az.go:53:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glided/gcp/gcp.go:44:29: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glided/gcp/gcp.go:53:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glided/ibm/ibm.go:44:29: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glided/ibm/ibm.go:53:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glided/kvserv/kvserv.go:45:29: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glided/kvserv/kvserv.go:63:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glided/orchestrator/orchestrator.go:39:29: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glided/orchestrator/orchestrator.go:43:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glided/startup/startup.go:90:3: ifElseChain: rewrite if-else to switch statement (gocritic)
internal/cli/glided/startup/startup.go:116:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glided/tagserv/tagserv.go:45:29: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/glided/tagserv/tagserv.go:63:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/invd/ibm/ibm.go:44:29: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/cli/invd/ibm/ibm.go:53:28: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/version/version.go:32:6: exported: type name will be used as version.VersionInfo by other packages, and that stutters; consider calling this Info (revive)
internal/version/version.go:79:6: exported: func name will be used as version.VersionString by other packages, and that stutters; consider calling this String (revive)
67 issues:
* errorlint: 1
* gocritic: 4
* lll: 3
* predeclared: 2
* revive: 57