From patchwork Tue Jan 20 22:25:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 5672661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CB551C058D for ; Tue, 20 Jan 2015 22:28:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 02E202045B for ; Tue, 20 Jan 2015 22:28:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB8AB203B7 for ; Tue, 20 Jan 2015 22:28:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YDhFA-0004pL-CZ; Tue, 20 Jan 2015 22:25:52 +0000 Received: from smtprelay0100.hostedemail.com ([216.40.44.100] helo=smtprelay.hostedemail.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YDhF5-0004nY-Hq for linux-arm-kernel@lists.infradead.org; Tue, 20 Jan 2015 22:25:49 +0000 Received: from filter.hostedemail.com (unknown [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id 8E7982691B4; Tue, 20 Jan 2015 22:25:20 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2, 0, 0, , d41d8cd98f00b204, joe@perches.com, :::::::::::::::::::::, RULES_HIT:41:355:379:541:800:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1714:1730:1747:1777:1792:2197:2199:2393:2559:2562:2828:2911:3138:3139:3140:3141:3142:3351:3653:3865:3866:3870:3871:3872:4321:4425:5007:6261:10004:10400:10848:11026:11232:11658:11914:12043:12517:12519:12555:13069:13208:13229:13255:13311:13357:14093:14097:14394:21067:21080, 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 X-HE-Tag: box09_68750e8df0007 X-Filterd-Recvd-Size: 2743 Received: from joe-X200MA.home (pool-71-103-235-196.lsanca.fios.verizon.net [71.103.235.196]) (Authenticated sender: joe@perches.com) by omf12.hostedemail.com (Postfix) with ESMTPA; Tue, 20 Jan 2015 22:25:17 +0000 (UTC) Message-ID: <1421792716.2724.11.camel@perches.com> Subject: [PATCH] checkpatch: Add ability to coalesce commit descriptions on multiple lines From: Joe Perches To: Paul Bolle , Andrew Morton Date: Tue, 20 Jan 2015 14:25:16 -0800 In-Reply-To: <1421660338.9655.21.camel@x220> References: <1421659937.9655.16.camel@x220> <1421660338.9655.21.camel@x220> X-Mailer: Evolution 3.12.7-0ubuntu1 Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150120_142547_670040_DD152244 X-CRM114-Status: UNSURE ( 8.82 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: Andrew Lunn , Russell King , Jason Cooper , linux-kernel@vger.kernel.org, Gregory Clement , Andy Whitcroft , Valentin Rothberg , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If a git commit description is split on consecutive lines, coalesce it before testing. This allows: commit ("some long description") Signed-off-by: Joe Perches Noticed-by: Paul Bolle --- > Checkpatch in next-21050119 complains: > ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("")' - ie: 'commit fa0ce4035d48 ("ARM: 7162/1: errata: tidy up Kconfig options for PL310 errata workarounds")' > #7: > commit fa0ce4035d48 ("ARM: 7162/1: errata: tidy up Kconfig options for > > total: 1 errors, 0 warnings, 14 lines checked > > Your patch has style problems, please review. > > Perhaps it doesn't notice the quote spans two lines. Can this be fixed > please? Oh bother... scripts/checkpatch.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 41223c9..6a3baa0 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2198,6 +2198,13 @@ sub process { defined $rawlines[$linenr] && $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) { $orig_desc = $1; + } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i && + defined $rawlines[$linenr] && + $rawlines[$linenr] =~ /^\s*[^"]+"\)/) { + $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i; + $orig_desc = $1; + $rawlines[$linenr] =~ /^\s*([^"]+)"\)/; + $orig_desc .= " " . $1; } ($id, $description) = git_commit_info($orig_commit,