All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] checkpatch-check-for-whitespace-before-semicolon-at-eol.patch removed from -mm tree
@ 2012-06-01 19:33 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2012-06-01 19:33 UTC (permalink / raw)
  To: eric.nelson, apw, joe, mm-commits


The patch titled
     Subject: checkpatch: check for whitespace before semicolon at EOL
has been removed from the -mm tree.  Its filename was
     checkpatch-check-for-whitespace-before-semicolon-at-eol.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
From: Eric Nelson <eric.nelson@boundarydevices.com>
Subject: checkpatch: check for whitespace before semicolon at EOL

Requires --strict option during invocation:
	~/linux$ scripts/checkpatch --strict foo.patch

This tests for a bad habits of mine like this:

	return 0 ;

Note that it does allow a special case of a bare semicolon
for empty loops:

	while (foo())
		;

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 scripts/checkpatch.pl |    7 +++++++
 1 file changed, 7 insertions(+)

diff -puN scripts/checkpatch.pl~checkpatch-check-for-whitespace-before-semicolon-at-eol scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-check-for-whitespace-before-semicolon-at-eol
+++ a/scripts/checkpatch.pl
@@ -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{
_

Patches currently in -mm which might be from eric.nelson@boundarydevices.com are

origin.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-06-01 19:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-01 19:33 [merged] checkpatch-check-for-whitespace-before-semicolon-at-eol.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.