aboutsummaryrefslogtreecommitdiff
path: root/lib/checksrc.pl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/checksrc.pl')
-rwxr-xr-xlib/checksrc.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/checksrc.pl b/lib/checksrc.pl
index 8fad2cfcb..ddd0b3623 100755
--- a/lib/checksrc.pl
+++ b/lib/checksrc.pl
@@ -143,6 +143,11 @@ sub scanfile {
checkwarn($line, length($1), $file, $l, "Trailing whitespace");
}
+ # crude attempt to detect // comments without too many false
+ # positives
+ if($l =~ /^([^"\*]*)[^:"]\/\//) {
+ checkwarn($line, length($1), $file, $l, "\/\/ comment");
+ }
# check spaces after for/if/while
if($l =~ /^(.*)(for|if|while) \(/) {
if($1 =~ / *\#/) {