8 ## Warn about windows-style newlines.
14 print " TAB:$fn:$.\n";
16 ## Warn about trailing whitespace.
18 print "Space\@EOL:$fn:$.\n";
20 ## Warn about control keywords without following space.
21 if (/\s(?:if|while|for|switch)\(/) {
22 print " KW(:$fn:$.\n";
24 ## Warn about multiple empty lines.
25 if ($lastnil && /^$/) {
26 print " DoubleNL:$fn:$.\n";
32 ### Juju to skip over comments and strings, since the tests
33 ### we're about to do are okay there.
49 s!"(?:[^\"]+|\\.)*"!"X"!g;
51 ## Warn about C++-style comments.
53 # print " //:$fn:$.\n";
56 ## Warn about braces preceded by non-space.
58 print " $1\{:$fn:$.\n";
60 ## Warn about multiple internal spaces.
61 #if (/[^\s,:]\s{2,}[^\s\\=]/) {
62 # print " X X:$fn:$.\n";
64 ## Warn about { with stuff after.
67 # print " {X:$fn:$.\n";
69 ## Warn about function calls with space before parens.
71 if ($1 ne "if" and $1 ne "while" and $1 ne "for" and
72 $1 ne "switch" and $1 ne "return" and $1 ne "int" and
73 $1 ne "void" and $1 ne "__attribute__") {
74 print " fn ():$fn:$.\n";