From b8607bacb9d5b728431cd7aebe8d9725d4345e3d Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Sat, 16 Nov 2024 11:52:42 +1100 Subject: [PATCH] Prefer not having nolint --- cmd/evaluate_all_command.go | 2 +- cmd/evaluate_sequence_command.go | 2 +- cmd/root.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/evaluate_all_command.go b/cmd/evaluate_all_command.go index 25009a65..ea82abef 100644 --- a/cmd/evaluate_all_command.go +++ b/cmd/evaluate_all_command.go @@ -12,7 +12,7 @@ func createEvaluateAllCommand() *cobra.Command { Use: "eval-all [expression] [yaml_file1]...", Aliases: []string{"ea"}, Short: "Loads _all_ yaml documents of _all_ yaml files and runs expression once", - ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { //nolint:revive + ValidArgsFunction: func(_ *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) { if len(args) == 0 { return nil, cobra.ShellCompDirectiveNoFileComp } diff --git a/cmd/evaluate_sequence_command.go b/cmd/evaluate_sequence_command.go index 16d78e98..e722415e 100644 --- a/cmd/evaluate_sequence_command.go +++ b/cmd/evaluate_sequence_command.go @@ -13,7 +13,7 @@ func createEvaluateSequenceCommand() *cobra.Command { Use: "eval [expression] [yaml_file1]...", Aliases: []string{"e"}, Short: "(default) Apply the expression to each document in each yaml file in sequence", - ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { //nolint:revive + ValidArgsFunction: func(_ *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) { if len(args) == 0 { return nil, cobra.ShellCompDirectiveNoFileComp } diff --git a/cmd/root.go b/cmd/root.go index 40fb549c..1a9aba9e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -66,7 +66,7 @@ yq -P -oy sample.json return evaluateSequence(cmd, args) }, - PersistentPreRunE: func(cmd *cobra.Command, args []string) error { //nolint:revive + PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { cmd.SetOut(cmd.OutOrStdout()) level := logging.WARNING stringFormat := `[%{level}] %{color}%{time:15:04:05}%{color:reset} %{message}`