mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
Fix linter errors
This commit is contained in:
parent
cc1f750da2
commit
e8dfaa897c
1 changed files with 3 additions and 0 deletions
|
@ -2239,6 +2239,7 @@ func TestUseDeprecatedFlags(t *testing.T) {
|
||||||
checkStringContains(t, output, "This flag is deprecated")
|
checkStringContains(t, output, "This flag is deprecated")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//nolint:goconst,nolintlint // Disable check for string literal occurrences
|
||||||
func TestTraverseWithParentFlags(t *testing.T) {
|
func TestTraverseWithParentFlags(t *testing.T) {
|
||||||
rootCmd := &Command{Use: "root", TraverseChildren: true}
|
rootCmd := &Command{Use: "root", TraverseChildren: true}
|
||||||
rootCmd.Flags().String("str", "", "")
|
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) {
|
func TestTraverseWithShorthandCombinationInParentFlags(t *testing.T) {
|
||||||
rootCmd := &Command{Use: "root", TraverseChildren: true}
|
rootCmd := &Command{Use: "root", TraverseChildren: true}
|
||||||
stringVal := rootCmd.Flags().StringP("str", "s", "", "")
|
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) {
|
func TestTraverseWithArgumentIdenticalToCommandName(t *testing.T) {
|
||||||
rootCmd := &Command{Use: "root", TraverseChildren: true}
|
rootCmd := &Command{Use: "root", TraverseChildren: true}
|
||||||
stringVal := rootCmd.Flags().StringP("str", "s", "", "")
|
stringVal := rootCmd.Flags().StringP("str", "s", "", "")
|
||||||
|
|
Loading…
Reference in a new issue