From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EB56ECAAD5 for ; Mon, 5 Sep 2022 18:00:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231910AbiIESAq convert rfc822-to-8bit (ORCPT ); Mon, 5 Sep 2022 14:00:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231872AbiIESAl (ORCPT ); Mon, 5 Sep 2022 14:00:41 -0400 Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BB7130F7E; Mon, 5 Sep 2022 11:00:40 -0700 (PDT) Received: from omf08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 0701E1C7378; Mon, 5 Sep 2022 18:00:38 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA id 0D4F120027; Mon, 5 Sep 2022 18:00:36 +0000 (UTC) Message-ID: Subject: Re: [PATCH] checkpatch: warn for non-standard fixes tag style From: Joe Perches To: Niklas =?ISO-8859-1?Q?S=F6derlund?= Cc: Dwaipayan Ray , Lukas Bulwahn , Jonathan Corbet , Andy Whitcroft , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, oss-drivers@corigine.com, Simon Horman , Louis Peens Date: Mon, 05 Sep 2022 11:00:35 -0700 In-Reply-To: References: <20220829155358.2546732-1-niklas.soderlund@corigine.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.44.4 (3.44.4-1.fc36) MIME-Version: 1.0 X-Stat-Signature: uncp4j6xx9jbwat6rjj9xty5a5f8dd17 X-Rspamd-Server: rspamout08 X-Rspamd-Queue-Id: 0D4F120027 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1+n5QMvrlHvXTuREULemMyhNEhC5t3e5V0= X-HE-Tag: 1662400836-313636 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2022-09-05 at 12:49 +0200, Niklas Söderlund wrote: > Hi Joe, > > Thanks for your feedback. > > On 2022-08-29 23:06:43 -0400, Joe Perches wrote: > > > + if ($line =~ > > > /(fixes:)\s+([0-9a-f]{5,})\s+($balanced_parens)/i) { > > > > Maybe use fixes:? so the colon is not required in poorly formed uses > > I tried that but I think it brings more problems then it is worth. With > that change the check would run for each line of the commit message that > begins with the string 'fixes', not just in the tags section of the > message. So it would warn for the commit message, I think it's not a problem. Look at the results of: $ git log -100000 --no-merges --format=email --grep="^fixes" -i | \ grep -i -P -oh '^fixes:?\s*[0-9a-f]{5,}\s*..' | \ sed -r -e 's/^(fixes:?\s*)[0-9a-f]+/\1/i' | \ sort | uniq -c | sort -rn | head -20 73974 Fixes: (" 1345 Fixes: (' 399 Fixes: 246 Fixes: (A 215 Fixes: (" 172 Fixes: (c 121 Fixes: (s 114 Fixes: (d 110 Fixes: (P 98 Fixes: (i 90 Fixes: (m 86 Fixes: (n 78 Fixes: : 57 Fixes (" 51 Fixes: "n 47 Fixes: (a 46 Fixes: (t 43 fixes: (" 42 Fixes: (p 41 Fixes: ('