We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09088a4 commit 12c253aCopy full SHA for 12c253a
scripts/checkpatch.pl
@@ -2377,6 +2377,14 @@ sub process {
2377
2378
my $rawline = $rawlines[$linenr - 1];
2379
2380
+# check if it's a mode change, rename or start of a patch
2381
+ if (!$in_commit_log &&
2382
+ ($line =~ /^ mode change [0-7]+ => [0-7]+ \S+\s*$/ ||
2383
+ ($line =~ /^rename (?:from|to) \S+\s*$/ ||
2384
+ $line =~ /^diff --git a\/[\w\/\.\_\-]+ b\/\S+\s*$/))) {
2385
+ $is_patch = 1;
2386
+ }
2387
+
2388
#extract the line range in the file after the patch is applied
2389
if (!$in_commit_log &&
2390
$line =~ /^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@(.*)/) {
0 commit comments