Explorar o código

Add a rule to detect misplaced labels during check-spaces

Sebastian Hahn %!s(int64=14) %!d(string=hai) anos
pai
achega
a64e660f0e
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      contrib/checkSpace.pl

+ 4 - 0
contrib/checkSpace.pl

@@ -20,6 +20,10 @@ for $fn (@ARGV) {
         if (/\t/) {
             print "      TAB:$fn:$.\n";
         }
+        ## Warn about markers that don't have a space in front of them
+        if (/^[a-zA-Z_][a-zA-Z_0-9]*:/) {
+            print "nosplabel:$fn:$.\n";
+        }
         ## Warn about trailing whitespace.
         if (/ +$/) {
             print "Space\@EOL:$fn:$.\n";