Don't allow these options to be combined. Miscellanea: o Add missing $P: to some die("reason message") output
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -246,6 +246,8 @@ list_types(0) if ($list_types); · 245 unmodified lines | |||
| 246 | $fix = 1 if ($fix_inplace); | 246 | $fix = 1 if ($fix_inplace); |
| 247 | $check_orig = $check; | 247 | $check_orig = $check; |
| 248 | 248 | ||
| 249 | die "$P: --git cannot be used with --file or --fix\n" if ($git && ($file || $fix)); | ||
| 250 | |||
| 249 | my $exit = 0; | 251 | my $exit = 0; |
| 250 | 252 | ||
| 251 | my $perl_version_ok = 1; | 253 | my $perl_version_ok = 1; |
| @@ -269,11 +271,11 @@ if ($color =~ /^[01]$/) { · 17 unmodified lines | |||
| 269 | } elsif ($color =~ /^auto$/i) { | 271 | } elsif ($color =~ /^auto$/i) { |
| 270 | $color = (-t STDOUT); | 272 | $color = (-t STDOUT); |
| 271 | } else { | 273 | } else { |
| 272 | die "Invalid color mode: $color\n"; | 274 | die "$P: Invalid color mode: $color\n"; |
| 273 | } | 275 | } |
| 274 | 276 | ||
| 275 | # skip TAB size 1 to avoid additional checks on $tabsize - 1 | 277 | # skip TAB size 1 to avoid additional checks on $tabsize - 1 |
| 276 | die "Invalid TAB size: $tabsize\n" if ($tabsize < 2); | 278 | die "$P: Invalid TAB size: $tabsize\n" if ($tabsize < 2); |
| 277 | 279 | ||
| 278 | sub hash_save_array_words { | 280 | sub hash_save_array_words { |
| 279 | my ($hashRef, $arrayRef) = @_; | 281 | my ($hashRef, $arrayRef) = @_; |