Skip to contentSkip to conversation

checkpatch: warn of whitespace before semicolon at end of line.

PATCH Superseded Eric Nelson 3 participants 4 messages May 1, 2012 – May 3, 2012 1 message not in the archive

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): http://lists.denx.de/pipermail/u-boot/2012-May/123551.html

#1 lore raw

PATCH 1/1 checkpatch: warn of whitespace before semicolon at end of line.

---
 tools/checkpatch.pl |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
tools/checkpatch.pl +6 -0
index 2048a44..0caffcb 100755
@@ -3139,6 +3139,12 @@ sub process {
 			 "Statements terminations use 1 semicolon\n" . $herecurr);
 		}
 
+# check for multiple semicolons
+		if ($line =~ /\s+;$/) {
+		    WARN("SPACEBEFORE_SEMICOLON",
+			 "Blank before semicolon\n" . $herecurr);
+		}
+
 # check for gcc specific __FUNCTION__
 		if ($line =~ /__FUNCTION__/) {
 			WARN("USE_FUNC",
Signature · 1 line
1.7.9
#2 lore raw

PATCH 1/1 checkpatch: warn of whitespace before semicolon at end of line.

Dear Eric Nelson,

tools/checkpatch.pl sub process { · line 3139

Quoted 11 lines
---
 tools/checkpatch.pl |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
tools/checkpatch.pl +0 -0
index 2048a44..0caffcb 100755
@@ -3139,6 +3139,12 @@ sub process {
 			 "Statements terminations use 1 semicolon\n" . 

$herecurr);

tools/checkpatch.pl sub process { · line 3142

Quoted 3 lines
tools/checkpatch.pl +1 -0
 		}
 
+# check for multiple semicolons

Are you sure about the comment ^ ;-)

tools/checkpatch.pl sub process { · line 3150

Quoted 8 lines
tools/checkpatch.pl +5 -0
+		if ($line =~ /\s+;$/) {
+		    WARN("SPACEBEFORE_SEMICOLON",
+			 "Blank before semicolon\n" . $herecurr);
+		}
+
 # check for gcc specific __FUNCTION__
 		if ($line =~ /__FUNCTION__/) {
 			WARN("USE_FUNC",

Best regards,
Marek Vasut

#3 lore raw

PATCH 1/1 checkpatch: warn of whitespace before semicolon at end of line.

In reply to Eric Nelson
Quoted 2 lines · On Tuesday 01 May 2012 18:06:16 Eric Nelson wrote:
 tools/checkpatch.pl |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

should be sent to lkml/kbuild lists ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120502/332dac01/attachment.pgp>

#4 lore raw

PATCH 1/1 checkpatch: warn of whitespace before semicolon at end of line.

Quoted 6 lines · Mike Frysinger
Quoted 2 lines · On Tuesday 01 May 2012 18:06:16 Eric Nelson wrote:
  tools/checkpatch.pl |    6 ++++++
  1 files changed, 6 insertions(+), 0 deletions(-)

should be sent to lkml/kbuild lists ...
-mike

Thanks for the pointer Mike.