Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4524927rwb; Sun, 4 Dec 2022 03:47:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf6bslruiB98Ra5NMf6lQAzrIBXjuIINzIJq9R60oz5tpLQs5bxgL8aReSK/vxhXEGJdYGHH X-Received: by 2002:a05:6402:3212:b0:46c:76da:b58b with SMTP id g18-20020a056402321200b0046c76dab58bmr3997539eda.116.1670154432599; Sun, 04 Dec 2022 03:47:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670154432; cv=none; d=google.com; s=arc-20160816; b=H9tLAXmtG9RX6CuEF5y2xyIg/05g8eohorxlnJw80YV7XQmPyLHRB59NiuRS4SPkJB GmHEfIrJV+Nz3+kQCCPcudbcqLfIwoKvLvV/WIO1/g5E7oIsRHFBJuASv8t4OaO7Zhpm 0jhDCnRuRw/qvZFiV8/KoA0hSgw3Apls5GtZIQL64vqos1jj4JKxTkhdEJGYCSRH3tkZ 0ITEtZIxSFw2fHcAKAJ10mzB/LCRdQKKBZAFOxkkFufmOakoBuKD8dbWX+egRY531lYb J0kMV1uHc0x54AvRDAXaK8B/QQspfINVNE5MgZTPVX8dWEa5412CEcqhdqu/onqo6KYA WzWw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VJrYnuXtiBSFM8wIyqH0Wc4NW/Goeu8r2zgeGw5N7hY=; b=KprdPrkRzRMG1p1uQhWlLjrJT8mpQoDllaTOqGnQ3NN2s8DLjN/qVSf247mUjB2hLX fl5iZt3QdMwKm2AZq6xXlu4Xmm0WvP7NtNcMEOa4mc0mYi9+fUyvX1OV5dYYm7MWymPA pV7lhZEwBt5QCFrTbZ40maT6a4yqGmDMAxh101fAILlDO1g6ozeuYBPZdwVS2MbGdssp WsE5pyZTA5da1QhpnG/r1ARDdXxarQEMQC4XIWCs/9M9Ipyhu8hh4eLzVvyvJjpfBpCG LquGwGPMMA2FOIQxyQsSA5xED7zFEg5+U8CsHlnGv83YNia/QncG+JT7p0NdsH9g/KWX DzzA== 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 i7-20020aa7c707000000b004612915d1a0si9865313edq.507.2022.12.04.03.46.45; Sun, 04 Dec 2022 03:47:12 -0800 (PST) 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 S230098AbiLDLjX (ORCPT + 82 others); Sun, 4 Dec 2022 06:39:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229908AbiLDLjC (ORCPT ); Sun, 4 Dec 2022 06:39:02 -0500 Received: from blackmesa.kw-serverwartung.de (blackmesa.kw-serverwartung.de [78.46.90.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A051E1838A for ; Sun, 4 Dec 2022 03:38:59 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by blackmesa.kw-serverwartung.de (Postfix) with ESMTP id A55107B81E4; Sun, 4 Dec 2022 11:33:49 +0000 (UTC) Received: from blackmesa.kw-serverwartung.de ([127.0.0.1]) by localhost (blackmesa.kw-serverwartung.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KInPBbexaMGr; Sun, 4 Dec 2022 11:33:47 +0000 (UTC) Received: from citadel.fritz.box (i5C74630E.versanet.de [92.116.99.14]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by blackmesa.kw-serverwartung.de (Postfix) with ESMTPSA id 6C9457B81BF; Sun, 4 Dec 2022 11:33:45 +0000 (UTC) From: =?UTF-8?q?Kai=20Wasserb=C3=A4ch?= To: linux-kernel@vger.kernel.org Cc: Andrew Morton , Thorsten Leemhuis Subject: [PATCH 2/2] feat: checkpatch: Warn about Reported-by: not being followed by a Link: Date: Sun, 4 Dec 2022 12:33:39 +0100 Message-Id: <721266a0e453bdebf9dc9b4a5fb5482f278fb7d0.1670152844.git.kai@dev.carbon-project.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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 Suggested-by: Thorsten Leemhuis Signed-off-by: Kai Wasserbäch --- scripts/checkpatch.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a6d2ccaa3e..d957e9fddf 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3144,6 +3144,20 @@ sub process { "Co-developed-by and Signed-off-by: name/email do not match \n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]); } } + +# check if Reported-by: is followed by a Link: + if ($sign_off =~ /^reported-by:$/i) { + if (!defined $lines[$linenr]) { + WARN("BAD_REPORTED_BY_LINK", + "Reported-by: must be immediately followed by Link:\n" . "$here\n" . $rawline); + } elsif ($rawlines[$linenr] !~ /^\s*link:\s*(.*)/i) { + WARN("BAD_REPORTED_BY_LINK", + "Reported-by: must be immediately followed by Link:\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]); + } elsif ($lines[$linenr] !~ /https?:\/\//i) { + WARN("BAD_REPORTED_BY_LINK", + "Link: following Reported-by: should contain an URL\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]); + } + } } # Check Fixes: styles is correct -- 2.35.1