summaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a4476b61e93f..79273003d5e7 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -55,6 +55,7 @@ my $spelling_file = "$D/spelling.txt";
55my $codespell = 0; 55my $codespell = 0;
56my $codespellfile = "/usr/share/codespell/dictionary.txt"; 56my $codespellfile = "/usr/share/codespell/dictionary.txt";
57my $color = 1; 57my $color = 1;
58my $allow_c99_comments = 1;
58 59
59sub help { 60sub help {
60 my ($exitcode) = @_; 61 my ($exitcode) = @_;
@@ -1144,6 +1145,11 @@ sub sanitise_line {
1144 $res =~ s@(\#\s*(?:error|warning)\s+).*@$1$clean@; 1145 $res =~ s@(\#\s*(?:error|warning)\s+).*@$1$clean@;
1145 } 1146 }
1146 1147
1148 if ($allow_c99_comments && $res =~ m@(//.*$)@) {
1149 my $match = $1;
1150 $res =~ s/\Q$match\E/"$;" x length($match)/e;
1151 }
1152
1147 return $res; 1153 return $res;
1148} 1154}
1149 1155