Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5656415rwb; Wed, 7 Sep 2022 06:15:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR6kW+OTj5oVikndwymYYl5n3XdPk/pbj18JVh3ie7qBlg0L1K0OKN1mdR6mXOGnYLkjnbED X-Received: by 2002:a17:90b:1941:b0:202:5715:2180 with SMTP id nk1-20020a17090b194100b0020257152180mr864080pjb.23.1662556503970; Wed, 07 Sep 2022 06:15:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662556503; cv=none; d=google.com; s=arc-20160816; b=ImanwQ6vuht+j5j1rfYB4EKKYHQtg804ZYVcOvFo60srNp2lPGVl3hTHlCnOac7nTW KYC+FOmOTy3OitXyNiWHZeT75M+mCM2uqbQLB6X4ryMQ/bw+8d442bnY8UJFtQbCA5p/ FHeY99Ornl0vRN9simyTxG03WjYPXLes3iMGeByuJTgO1yaX91UcLQ87BzM8OHzC3G97 AbBXQfl20il06LhqYK79ofAIuXgC6MqJeddpYtiyp8lclGGwKqhYXYh4/d63PfuoTF5F 4H4/8g6U5ZliNb12BMQs2XM4MupiI7mmTvQwEslg+rG2xm1Ik9bxcSH5ajqQDQgGLaR2 sTew== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=5pfokxAVc0hlaXkZtkeyTSEteT00Vf9sxJy1MGTNJS8=; b=XXXRz/rwkus/13KZi+79GIVbLUvPDz71/pj1Sn1uRVbt9EqBO9ySDNX/Y1+C16P2Mn fD8MughGHzhAL8ntQ6aAQRjbORjgnWxdw3HjuVONkDe8WUWmaCRxQdWiv6KK117fRd5m wl1HurPau4smXJIsBp6joB4VGU8HR1WrkIEi+9w+H6Gu1nyU1owIbm4euwzSZs4EKTDg y3O2apWMXd8/wzQlJZMo3OVzTf2wNKNweUUxNjLMwvpz4TsR3k9UT8LPQB1ftxliaUFB kIRr0hGFypcM4XRdjOi4wNB2+rCguwMYEKwQnk7v+1GuNlhZkvqfsUhPdtlDG0ZSKTnG eo6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pschenker.ch header.s=20220412 header.b=utss6XnT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pschenker.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x26-20020a63b21a000000b0041d7e787be6si18796730pge.170.2022.09.07.06.14.52; Wed, 07 Sep 2022 06:15:03 -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; dkim=pass header.i=@pschenker.ch header.s=20220412 header.b=utss6XnT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pschenker.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229684AbiIGMgS (ORCPT + 99 others); Wed, 7 Sep 2022 08:36:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbiIGMgO (ORCPT ); Wed, 7 Sep 2022 08:36:14 -0400 Received: from smtp-bc0b.mail.infomaniak.ch (smtp-bc0b.mail.infomaniak.ch [IPv6:2001:1600:3:17::bc0b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FCDFB275A for ; Wed, 7 Sep 2022 05:36:11 -0700 (PDT) Received: from smtp-2-0000.mail.infomaniak.ch (unknown [10.5.36.107]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4MN1vY0cMMzMqC35; Wed, 7 Sep 2022 14:36:09 +0200 (CEST) Received: from philippe-pc.toradex.int (unknown [31.10.206.125]) by smtp-2-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4MN1vW6p3PzMppZ3; Wed, 7 Sep 2022 14:36:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pschenker.ch; s=20220412; t=1662554169; bh=OfaoBsKpDFqckHovf40Gpkkxx6wVziWuBLb6theEUt8=; h=From:To:Cc:Subject:Date:From; b=utss6XnT4z+9MgncvQF1+6lz1TxlJrihhFkYVlAH/AqGLtYM7f/grafmdYOwFgXkk BoRBAF8p3iCUX4/iRqM+G8kCXoWG3xnF9+gFzILsUzTVwJmpb+QZVQNZwSJZWq8RTP CtkqdsvZ/kab/m5H0pCPKseTFEricBwCzwT6lcdw= From: Philippe Schenker To: Andy Whitcroft , Joe Perches , linux-kernel@vger.kernel.org Cc: Stephen Rothwell , Dwaipayan Ray , Lukas Bulwahn , Shawn Guo , Philippe Schenker Subject: [PATCH] checkpatch: add check for fixes: tag Date: Wed, 7 Sep 2022 14:35:47 +0200 Message-Id: <20220907123547.138646-1-dev@pschenker.ch> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 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 From: Philippe Schenker The page about submitting patches in Documentation/process/submitting-patches.rst is very specific on how that tag should be formatted: 'Fixes: <12+ chars of sha1> (\"\")' Add a rule that warns if this format does not match. This commit is introduced as in the past commits have been sent multiple times with having the word commit also in the Fixes: tag which had to be corrected by the maintainers. [1] [1] https://lore.kernel.org/all/20220906073746.1f2713f7@canb.auug.org.au/ Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> --- scripts/checkpatch.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 79e759aac543..0d7ce0c3801a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3438,6 +3438,13 @@ sub process { } } +# Check fixes tag format + if ($in_commit_log && ($line =~ /^\s*Fixes:/i) && + !($line =~ /^\s*Fixes:\s[0-9a-f]{12,40}\s\(\".*\"\)/)) { + WARN("FIXES_TAG_FORMAT", + "Possible wrong format on Fixes: tag, please use format Fixes: <12+ chars of sha1> (\"<title line>\")\n" . $herecurr); + } + # ignore non-hunk lines and lines being removed next if (!$hunk_line || $line =~ /^-/); -- 2.37.2