From e8dfaa897c794304098c620ff53130b3f68d28ea Mon Sep 17 00:00:00 2001 From: Ionut Nicula Date: Sat, 12 Oct 2024 12:23:52 +0300 Subject: [PATCH] Fix linter errors --- command_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command_test.go b/command_test.go index 9fb0bdf..f82c887 100644 --- a/command_test.go +++ b/command_test.go @@ -2239,6 +2239,7 @@ func TestUseDeprecatedFlags(t *testing.T) { checkStringContains(t, output, "This flag is deprecated") } +//nolint:goconst,nolintlint // Disable check for string literal occurrences func TestTraverseWithParentFlags(t *testing.T) { rootCmd := &Command{Use: "root", TraverseChildren: true} rootCmd.Flags().String("str", "", "") @@ -2261,6 +2262,7 @@ func TestTraverseWithParentFlags(t *testing.T) { } } +//nolint:goconst,nolintlint // Disable check for string literal occurrences func TestTraverseWithShorthandCombinationInParentFlags(t *testing.T) { rootCmd := &Command{Use: "root", TraverseChildren: true} stringVal := rootCmd.Flags().StringP("str", "s", "", "") @@ -2289,6 +2291,7 @@ func TestTraverseWithShorthandCombinationInParentFlags(t *testing.T) { } } +//nolint:goconst,nolintlint // Disable check for string literal occurrences func TestTraverseWithArgumentIdenticalToCommandName(t *testing.T) { rootCmd := &Command{Use: "root", TraverseChildren: true} stringVal := rootCmd.Flags().StringP("str", "s", "", "")