Fix linter errors

This commit is contained in:
Ionut Nicula 2024-10-12 12:23:52 +03:00
parent cc1f750da2
commit e8dfaa897c
1 changed files with 3 additions and 0 deletions

View File

@ -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", "", "")