Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754249AbbLDA3o (ORCPT ); Thu, 3 Dec 2015 19:29:44 -0500 Received: from smtprelay0113.hostedemail.com ([216.40.44.113]:33486 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752137AbbLDA3n (ORCPT ); Thu, 3 Dec 2015 19:29:43 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:960: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:11026:11232:11658:11783:11914:12043:12050:12294:12517:12519:12555:12679:12740:13069:13311:13357:13894:14659:21080:21221:30054:30080: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: show20_8eca529967640 X-Filterd-Recvd-Size: 2478 Message-ID: <1449188980.17296.18.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:29:40 -0800 In-Reply-To: <20151204001318.GA57739@google.com> References: <20151116224321.GR8456@google.com> <1447782507.6012.22.camel@perches.com> <20151117180336.GE8456@google.com> <20151204001318.GA57739@google.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: 1776 Lines: 45 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: diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9f0949b..196b77b 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2397,22 +2397,26 @@ 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; + print("here1\n"); ? } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i && ? ?defined $rawlines[$linenr] && - ?$rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) { + ?$rawlines[$linenr] =~ /^\s*\("(.*)"\)/) { ? $orig_desc = $1; ? $hasparens = 1; + print("here2\n"); ? } 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; + print("orig_desc: <$orig_desc>\n"); + print("here3\n"); ? } ? ? ($id, $description) = git_commit_info($orig_commit, -- 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/