Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4142226pxb; Sat, 6 Nov 2021 07:44:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLAvdN7Zfqzz+jYWXXW5CfcRJ3Kcl9uhuuE+enlo2jEkhumuOECNgoy2seW66WxZe6P466 X-Received: by 2002:a92:cd8f:: with SMTP id r15mr38501350ilb.278.1636209853294; Sat, 06 Nov 2021 07:44:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636209853; cv=none; d=google.com; s=arc-20160816; b=APsl0bGtrBWuoXpq62maOck9vu0Odlq6k2pczIwAgLFLGD3N4Y/uUqbxxqyNSZRL8T Q6l14b45iioMwTQrPOyP7/TCiy3OQAibawn6BvsqmJuV+bKBiN99wI/zHX0sXcsW2pvm lHBH/5tb043nGnx+bmSJSpmqWacJl+1EeVGlf+PJ5+Dz7hzfInXLhhp29dngUvX9wb3Y Fixgs9qy0sD3E2Avl839m47yFiLrqKosqX9LBEnfBkpdoI8AAkW5w83XDKbCadAVDbr2 jjy+26cOT+97ob+F6ygXkNl/It6NEzAP2WrRBz7Vk/GrY9SGPHLRNuKv+enARTVUucuC KIJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=zTXZ7Ydn2F2q0bwj3UkXckIzDZBieSJir7qA2tZ/mcM=; b=X3nn1hvkfwnrJNsnQjwHX66Q71NFruil5Mehzs/b4WIBZ3jGLKZUjArHMFvfuZ5bry LmGbH3AKUhoHnmm8H0tkuqaLilIPe8rdd0/qAuSkgBTPsq1SFtmrF5FhskepoNsa6A3H 50QOJfcJM0A+0zSU+htraHjt4YCKOz1ifoNDeNVz6xLuhVHFggCg39jwnV19B3Lj1Dci ELxXoEOQywZypfBtXb0ucNBl4r+C4xsXjBAYwt/RpoYx0Hlj1uINLzne0LmwP/nk7QR5 OHbJtYoAaL16Tekk+sQFhku9hue5ZJFNbXuPoW1YjcpvPAufxKg0mDKrhztjF2JpE5lQ 57tQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si22893786ilu.139.2021.11.06.07.43.28; Sat, 06 Nov 2021 07:44:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233523AbhKFH1q (ORCPT + 99 others); Sat, 6 Nov 2021 03:27:46 -0400 Received: from smtprelay0075.hostedemail.com ([216.40.44.75]:56296 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230307AbhKFH1p (ORCPT ); Sat, 6 Nov 2021 03:27:45 -0400 Received: from omf02.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id B49A6837F24A; Sat, 6 Nov 2021 07:25:03 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA id B32A11D42FD; Sat, 6 Nov 2021 07:25:02 +0000 (UTC) Message-ID: Subject: Re: [PATCH] checkpatch: relax regexp for COMMIT_LOG_LONG_LINE From: Joe Perches To: Jerome Forissier , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn , Andrew Morton Cc: linux-kernel@vger.kernel.org Date: Sat, 06 Nov 2021 00:25:01 -0700 In-Reply-To: <74572362-c45c-b10f-f825-2e8bb4e3b027@forissier.org> References: <20210923143842.2837983-1-jerome@forissier.org> <74572362-c45c-b10f-f825-2e8bb4e3b027@forissier.org> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.4-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Stat-Signature: 4offg34pbmrog65n7yajjffrfa4x65uq X-Rspamd-Server: rspamout01 X-Rspamd-Queue-Id: B32A11D42FD X-Spam-Status: No, score=-2.34 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1+sTaN7uY7+CFfxzEcam86v0cFFO4f5Zzk= X-HE-Tag: 1636183502-825960 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2021-11-05 at 11:31 +0100, Jerome Forissier wrote: > On 9/23/21 16:38, Jerome Forissier wrote: > > One exceptions to the COMMIT_LOG_LONG_LINE rule is a file path followed > > by :. That is typically some sort diagnostic message from a compiler or > > a build tool, in which case we don't want to wrap the lines but keep the > > message unmodified. > > The regular expression used to match this pattern currently doesn't > > accept absolute paths or + characters. This can result in false > > positives as in the following (out-of-tree) example: [] > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > > @@ -3147,7 +3147,7 @@ sub process { > > length($line) > 75 && > > !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ || > > # file delta changes > > - $line =~ /^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:/ || > > + $line =~ /^\s*(?:[\w\.\-\+]*\/)++[\w\.\-\+]+:/ || > > # filename then : I looked the number of new matches $ git log --format=email -100000 | \ grep -P '^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:' | wc -l 21160 $ git log --format=email -100000 | \ grep -P '^\s*(?:[\w\.\-\+]*\/)++[\w\.\-]+:' | wc -l 21627 OK, so around 3% more matches. And then looked only at these new matches $ git log --format=email -100000 | \ grep -P '^\s*(?:[\w\.\-\+]*\/)++[\w\.\-]+:' | \ grep -P -v '^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:' And all these new matches look OK to me to ignore for long lines. Out of tree or not... Acked-by: Joe Perches