checkpatch: check for whitespace before semicolon at EOL
[profile/ivi/kernel-x86-ivi.git] / scripts / checkpatch.pl
index faea0ec..2262e1f 100755 (executable)
@@ -2448,6 +2448,13 @@ sub process {
                                     "space prohibited between function name and open parenthesis '('\n" . $herecurr);
                        }
                }
+
+# check for whitespace before a non-naked semicolon
+               if ($line =~ /^\+.*\S\s+;/) {
+                       CHK("SPACING",
+                           "space prohibited before semicolon\n" . $herecurr);
+               }
+
 # Check operator spacing.
                if (!($line=~/\#\s*include/)) {
                        my $ops = qr{