diff --git a/command/auth/login/login.go b/command/auth/login/login.go index fb8d1b1b..2a43b23d 100644 --- a/command/auth/login/login.go +++ b/command/auth/login/login.go @@ -48,7 +48,7 @@ func NewCmdLogin() *cobra.Command { Short: "Log in to DeepSource using Command Line Interface", Long: doc, Args: utils.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, args []string) error { return opts.Run() }, } diff --git a/command/auth/logout/logout.go b/command/auth/logout/logout.go index 6d9e3e82..17a1480a 100644 --- a/command/auth/logout/logout.go +++ b/command/auth/logout/logout.go @@ -18,7 +18,7 @@ func NewCmdLogout() *cobra.Command { Use: "logout", Short: "Logout of your active DeepSource account", Args: utils.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { opts := LogoutOptions{} return opts.Run() }, diff --git a/command/auth/refresh/refresh.go b/command/auth/refresh/refresh.go index b71592d3..6a3db5a0 100644 --- a/command/auth/refresh/refresh.go +++ b/command/auth/refresh/refresh.go @@ -32,7 +32,7 @@ func NewCmdRefresh() *cobra.Command { Short: "Refresh stored authentication credentials", Long: doc, Args: utils.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { return opts.Run() }, } diff --git a/command/auth/status/status.go b/command/auth/status/status.go index 40af9ce4..1ea0689e 100644 --- a/command/auth/status/status.go +++ b/command/auth/status/status.go @@ -26,7 +26,7 @@ func NewCmdStatus() *cobra.Command { Short: "View the authentication status", Long: doc, Args: utils.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { opts := AuthStatusOptions{} return opts.Run() }, diff --git a/command/config/generate/generate.go b/command/config/generate/generate.go index 4c719dbe..c3414bcd 100644 --- a/command/config/generate/generate.go +++ b/command/config/generate/generate.go @@ -40,7 +40,7 @@ func NewCmdConfigGenerate() *cobra.Command { Short: "Generate config for DeepSource", Long: doc, Args: utils.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { return o.Run() }, } diff --git a/command/config/validate/validate.go b/command/config/validate/validate.go index 500cb50a..78bfd715 100644 --- a/command/config/validate/validate.go +++ b/command/config/validate/validate.go @@ -30,7 +30,7 @@ func NewCmdValidate() *cobra.Command { Use: "validate", Short: "Validate DeepSource config", Args: utils.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, args []string) error { return o.Run() }, } diff --git a/command/issues/list/list.go b/command/issues/list/list.go index 4e6e6064..0a79bf90 100644 --- a/command/issues/list/list.go +++ b/command/issues/list/list.go @@ -72,7 +72,7 @@ func NewCmdIssuesList() *cobra.Command { Use: "list", Short: "List issues reported by DeepSource", Long: doc, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, args []string) error { opts.FileArg = args return opts.Run() }, diff --git a/command/repo/status/status.go b/command/repo/status/status.go index 42dea01b..3d3f9f72 100644 --- a/command/repo/status/status.go +++ b/command/repo/status/status.go @@ -40,7 +40,7 @@ func NewCmdRepoStatus() *cobra.Command { Short: "View the activation status for the repository.", Long: doc, Args: utils.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { return opts.Run() }, } diff --git a/command/repo/view/view.go b/command/repo/view/view.go index 2fff4427..8a4e55a0 100644 --- a/command/repo/view/view.go +++ b/command/repo/view/view.go @@ -43,7 +43,7 @@ func NewCmdRepoView() *cobra.Command { Short: "Open the DeepSource dashboard of a repository", Long: doc, Args: utils.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, args []string) error { return opts.Run() }, } diff --git a/command/report/report.go b/command/report/report.go index 364c9dbc..c8edbbd4 100644 --- a/command/report/report.go +++ b/command/report/report.go @@ -54,7 +54,7 @@ func NewCmdReport() *cobra.Command { Short: "Report artifacts to DeepSource", Long: doc, Args: utils.NoArgs, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { returnCode := opts.Run() sentry.Flush(2 * time.Second) defer os.Exit(returnCode) diff --git a/command/version/command.go b/command/version/command.go index b7fff01c..1f37c189 100644 --- a/command/version/command.go +++ b/command/version/command.go @@ -20,7 +20,7 @@ func NewCmdVersion() *cobra.Command { Use: "version", Short: "Get the version of the DeepSource CLI", Args: utils.NoArgs, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { o := Options{} fmt.Println(o.Run()) }, diff --git a/version/version_test.go b/version/version_test.go index 067f27ea..441f05ed 100644 --- a/version/version_test.go +++ b/version/version_test.go @@ -75,7 +75,7 @@ func TestSetBuildInfo(t *testing.T) { }, } for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { + t.Run(tt.name, func(_ *testing.T) { SetBuildInfo(tt.args.version, tt.args.dateStr, tt.args.gitTreeState, tt.args.gitCommit) }) if !reflect.DeepEqual(buildInfo, want) {