Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
inicula committed Oct 12, 2024
1 parent cc1f750 commit e8dfaa8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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", "", "")
Expand All @@ -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", "", "")
Expand Down Expand Up @@ -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", "", "")
Expand Down

0 comments on commit e8dfaa8

Please sign in to comment.