Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2422642rwb; Fri, 9 Dec 2022 01:46:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf4i2x/b7Ah1I8A4o8/trrkuWhKpBIv4d3fK4g6c+09n1v8EBjj3u1os71jucznSlh3hIX5D X-Received: by 2002:a17:907:6014:b0:7c0:eb35:b3f9 with SMTP id fs20-20020a170907601400b007c0eb35b3f9mr3561004ejc.30.1670579172927; Fri, 09 Dec 2022 01:46:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670579172; cv=none; d=google.com; s=arc-20160816; b=gujKcCx252M+kllVQdzOSax6QFZvEsAlj0Rqlre4ZFVONtO821OXYz0rp/kEL+CFm+ fXs6OgImlkqlpPmJqsgBa0sNoBMyAVOnxPgCdw9wVzq9AgapHKlBolz2EkvON14NQZtD 52GVQC7HI+WahrhZYeVfrrjLOUP+LwromBpkZ+qR2mSYkL2DJjAxNrPsFgYfNfS1YDRX +H/6P3uijWi6s4CqaOfUcrJcvLlasKrs0DhYM5bwC6jiA6QZ3lF/PNek3IwR8m+/V+Z2 xi2+k+lfUGGKB4re5vpLdfPSxp0eXDfbF3i1QqtEFT9Asim8KzmBaXyuiT8tRSnNn1FU LZTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id; bh=VxU+WQhbJTB6+gwBRyqZ3CJno/xeEPxODh3AufvOZUA=; b=dgX9DV4PlkLC2RhnONJflX1uAzV6Ypwv4VYAiMNWmeR9PqtD4H09PkihNmkmsdGVhv NanJpprCZa87F1tMAIHMxNpJbIB42TW4s2hlF0htIvhmDOjoQN4MrnJAOjnOoNFt9Hhw ltlsgfqYBUIr6f07eQ/Xhtj8BAIp4BuOhHL88a9tfkHl8QEispxjNjPJ+8vVGmhLQzoU IGfjHPF4Y+UzYsUACP+I+Fl1F9QQhcflFUbU9JMvg7j7oE4t5UK34kquipsqPuLPzwAy FnkyUXNBFTIB24J3SoL5JbKsEDWRfwegVCRCLV9+7A+QaCJOVz5NTWfH1dnFqvTwiNtr 0voQ== 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 b28-20020a170906729c00b007c0fd176698si850219ejl.772.2022.12.09.01.45.54; Fri, 09 Dec 2022 01:46: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 S229982AbiLIJdW (ORCPT + 73 others); Fri, 9 Dec 2022 04:33:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229675AbiLIJdU (ORCPT ); Fri, 9 Dec 2022 04:33:20 -0500 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A5BD1F614 for ; Fri, 9 Dec 2022 01:33:19 -0800 (PST) Received: from [2a02:8108:963f:de38:eca4:7d19:f9a2:22c5]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1p3Zks-0003zj-1p; Fri, 09 Dec 2022 10:33:18 +0100 Message-ID: <35f626fb-9524-a7e3-664f-1b3150fe08c8@leemhuis.info> Date: Fri, 9 Dec 2022 10:33:17 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Content-Language: en-US, de-DE To: Joe Perches , =?UTF-8?Q?Kai_Wasserb=c3=a4ch?= , linux-kernel@vger.kernel.org Cc: Andrew Morton , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn References: <869badb999d4021dd6efd792f53fc2859257c350.1670527774.git.kai@dev.carbon-project.org> From: Thorsten Leemhuis Subject: Re: [PATCH 1/2] checkpatch: warn when unknown tags are used for links In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-bounce-key: webpack.hosteurope.de;linux@leemhuis.info;1670578400;8d25fb65; X-HE-SMSGID: 1p3Zks-0003zj-1p X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On 08.12.22 20:58, Joe Perches wrote: > On Thu, 2022-12-08 at 20:32 +0100, Kai Wasserbäch wrote: >> Issue a warning when encountering URLs behind unknown tags, as Linus >> recently stated ```please stop making up random tags that make no sense. >> Just use "Link:"```[1]. That statement was triggered by an use of >> 'BugLink', but that's not the only tag people invented: >> >> $ git log -100000 --format=email -P --grep='^\w+:[ \t]*http' | \ > > Please use the --no-merges output Done, good point. > [...] >> @@ -3239,6 +3239,13 @@ sub process { >> $commit_log_possible_stack_dump = 0; >> } >> >> +# Check for odd tags before a URI/URL >> + if ($in_commit_log && >> + $line =~ /^\s*(\w+):\s*http/ && $1 !~ /^Link/) { >> + WARN("COMMIT_LOG_USE_LINK", >> + "Unknown link reference '$1:', use 'Link:' instead.\n" . $herecurr); > > This would allow LinkFoo: so better would be > > $line =~ /^\s*(\w+):\s*http/ && $1 ne 'Link') > or > $line =~ /^\s*(\w+):\s*http/ && $1 !~ /^Link$/) { > > (and checkpatch doesn't use periods after output messages) > > Maybe better as well would be to use something like the below to > better describe the preferred location of patch versioning info. > > # Check for odd tags before a URI/URL > if ($in_commit_log && > $line =~ /^\s*(\w+):\s*http/ && $1 ne 'Link') { > if ($1 =~ /^v(?:ersion)?\d+/i) { > WARN("COMMIT_LOG_VERSIONING", > "Patch version information should be after the --- line\n" . $herecurr); > } else { > WARN("COMMIT_LOG_USE_LINK", > "Unknown link reference '$1:', use 'Link:' instead\n" . $herecurr); > } > } > Yeah, that looks like a really good idea. I went with that. But I'd say this is the point where this really warrants a Co-developed-by: that mentions you (and thus a Signed-off-by: from your side, too), don't you think so? Ciao, Thorsten