Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp8121963rwn; Wed, 14 Sep 2022 09:13:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR5tHQfzFgwktIRjYQLs8VT4J58F41y3ycGBfydBuK7U2Tb32pvHoUQOQSZEflmwbbLzfge4 X-Received: by 2002:a05:6402:518d:b0:451:6655:5fb4 with SMTP id q13-20020a056402518d00b0045166555fb4mr17299145edd.150.1663172006431; Wed, 14 Sep 2022 09:13:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663172006; cv=none; d=google.com; s=arc-20160816; b=DjsZTuDbeCBFRJt/A5+qGwdMd3k/Gxt107/RnERB13X93RlLACrovq3/NKlwiLmDZP KgWdPxV6PAQoKTLn8fERRhXNgifl+3z5gJQMj0rUv46bWtl9iyHmk/2sknRue1EX+kv8 caMKAMOJZ14ujLcHmDiRes55DFGD8a460cHRauIVoqcR8+mYlQoDiba5Of1fe1QRfkz6 rHh7/hpQAkI3X6VsrNqr7nrDLk6Xumpdckog0rf9p10aMjooiL5uRdtCqXJzTQf+sqXx 3AbGpreIJ+Uxia1DnlwdUYVo88ezQA5NZPhQU9Vy2HJ+MmI41YwY6Dfj3WEyLGoMnn8T gG2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=mzh8rIwaThn0vDxG1bsfflGCwjqOdycMj+rT5XLUKRc=; b=s97eIjNZ+F+p9VGVsPzn9Ry1Pix3i+xIs/5Ylk1/yOVqa5o7qQwhXiEgSSGgfw/dn6 /36uWGJpLZoPrlIv8mbGqz2SJVfBF9D2EnLxyv2yaAijSc+3zvHVYT+ajhYLBI0VLMp5 jvTGUAJaxAWsWN1RpQClaOmNHoKB/px5VlPpGwx/wBjSRdvm5IogxOS9bMw5C/OUe8w/ bt+HvIz/5n9+lNcTNNgb/cPlE96vN+i8Jv3cgVRyDIxDjmr9rnw5ZMkTOh3mzAgfNeRe y7syDmmfIrD9oaYHrvLLhYsJuuSBzldUGY2Ws45Rk8KVhzMLDWXVMmTc76qpLfmkKngR sr4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz34-20020a1709077da200b0077fd5b45e18si4354667ejc.929.2022.09.14.09.13.00; Wed, 14 Sep 2022 09:13:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229615AbiINQJm convert rfc822-to-8bit (ORCPT + 99 others); Wed, 14 Sep 2022 12:09:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbiINQJd (ORCPT ); Wed, 14 Sep 2022 12:09:33 -0400 Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2DF7BED; Wed, 14 Sep 2022 09:09:29 -0700 (PDT) Received: from omf08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 952D880C18; Wed, 14 Sep 2022 16:09:27 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA id 09AAD20025; Wed, 14 Sep 2022 16:09:25 +0000 (UTC) Message-ID: Subject: Re: [PATCH v7] checkpatch: warn for non-standard fixes tag style From: Joe Perches To: Niklas =?ISO-8859-1?Q?S=F6derlund?= , Dwaipayan Ray , Lukas Bulwahn , Jonathan Corbet , Andy Whitcroft , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Philippe Schenker , Stephen Rothwell Cc: oss-drivers@corigine.com, Simon Horman , Louis Peens Date: Wed, 14 Sep 2022 09:09:25 -0700 In-Reply-To: <20220914100255.1048460-1-niklas.soderlund@corigine.com> References: <20220914100255.1048460-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-Rspamd-Queue-Id: 09AAD20025 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Stat-Signature: 9md5hxrn71chdp7f1f7hcsjjgts5nfpt X-Rspamd-Server: rspamout05 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX183LY6G42xmDTBsfnC5aVm3gnaz6IMy0ks= X-HE-Tag: 1663171765-135009 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2022-09-14 at 12:02 +0200, Niklas S?derlund wrote: > Add a warning for fixes tags that does not follow community conventions. [] > * Changes since v6 > - Update first check to make sure that there is a likely SHA1 of some > minimum length after the fixes line. https://lore.kernel.org/lkml/2febb7893346b6234983453de7c037536e479bfc.camel@perches.com/ The goal here should be to identify a line that looks like a commit reference. So find lines that starts with 'fixes' and have a SHA1 commit id as broadly as reasonable. Did you run the grep pattern and look at the results? One grep pattern to verify the non canonical fixes format that are mistakenly used is: $ git log --since=5-years-ago --no-merges --grep='^\s*fixes' -i --format=email -P | \ grep -P -i '^\s*fixes' | \ grep -P -v '^Fixes: [0-9a-f]{12,12}\s*\(".*")' [] There are many different styles. Parenthesea are sometimes not used. > + if ($line =~ /(\s*fixes:?)\s+([0-9a-f]{5,})\s+($balanced_parens)/i) { How about some pattern like /fixes\s*:?\s*(?:commit:?\s*)?[0-9a-f]{5,}/i or maybe even more broadly: /fixes\b.*\b[0-9a-f]{5,}\b/i