Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754327AbbLDAgd (ORCPT ); Thu, 3 Dec 2015 19:36:33 -0500 Received: from smtprelay0099.hostedemail.com ([216.40.44.99]:51830 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751146AbbLDAgb (ORCPT ); Thu, 3 Dec 2015 19:36:31 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2197:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3653:3865:3867:4321:5007:6261:10004:10400:10848:11232:11658:11783:11914:12043:12050:12294:12517:12519:12555:12740:13069:13311:13357:13894:14659:21080:21221:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: rock22_38c3f2c19f642 X-Filterd-Recvd-Size: 2545 Message-ID: <1449189388.17296.20.camel@perches.com> Subject: Re: [BUG] checkpatch: false positive for commits with quote characters From: Joe Perches To: Brian Norris Cc: Andy Whitcroft , linux-kernel@vger.kernel.org Date: Thu, 03 Dec 2015 16:36:28 -0800 In-Reply-To: <1449188980.17296.18.camel@perches.com> References: <20151116224321.GR8456@google.com> <1447782507.6012.22.camel@perches.com> <20151117180336.GE8456@google.com> <20151204001318.GA57739@google.com> <1449188980.17296.18.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.2-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1798 Lines: 46 On Thu, 2015-12-03 at 16:29 -0800, Joe Perches wrote: > On Thu, 2015-12-03 at 16:13 -0800, Brian Norris wrote: > > Ping? I've hit some different false positives today on the same rule. > > I'll stop bothering to report them if no one cares. > > Perhaps this: (minus the debugging this time...) --- ?scripts/checkpatch.pl | 8 ++++---- ?1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d4960f7..b23dff8 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2397,20 +2397,20 @@ sub process { ? $long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i); ? $space = 0 if ($line =~ /\bcommit [0-9a-f]/i); ? $case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/); - if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) { + if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("(.*)"\)/i) { ? $orig_desc = $1; ? $hasparens = 1; ? } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i && ? ?defined $rawlines[$linenr] && - ?$rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) { + ?$rawlines[$linenr] =~ /^\s*\("(.*)"\)/) { ? $orig_desc = $1; ? $hasparens = 1; ? } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i && ? ?defined $rawlines[$linenr] && - ?$rawlines[$linenr] =~ /^\s*[^"]+"\)/) { + ?$rawlines[$linenr] =~ /^\s*.*"\)/) { ? $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i; ? $orig_desc = $1; - $rawlines[$linenr] =~ /^\s*([^"]+)"\)/; + $rawlines[$linenr] =~ /^\s*(.*)"\)/; ? $orig_desc .= " " . $1; ? $hasparens = 1; ? } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/