From nobody Thu May 2 14:28:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549317522211153.79598505014212; Mon, 4 Feb 2019 13:58:42 -0800 (PST) Received: from localhost ([127.0.0.1]:49992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqmGC-0003nM-9T for importer@patchew.org; Mon, 04 Feb 2019 16:58:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqmER-0002mq-RE for qemu-devel@nongnu.org; Mon, 04 Feb 2019 16:56:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqmEL-0003WC-QL for qemu-devel@nongnu.org; Mon, 04 Feb 2019 16:56:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36240) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gqmEI-000330-3S for qemu-devel@nongnu.org; Mon, 04 Feb 2019 16:56:39 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 468DB3D47A; Mon, 4 Feb 2019 21:56:29 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-162.phx2.redhat.com [10.3.116.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id C926A89247; Mon, 4 Feb 2019 21:56:28 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 4 Feb 2019 15:56:27 -0600 Message-Id: <20190204215627.2099-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 04 Feb 2019 21:56:29 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] checkpatch: Flag suspicious attribution lines X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Flag commit attribution tags that are unusual (often because they were a typo), but only as a warning (because sometimes a humorous or otherwise useful tag is intentionally supplied). This picks the 6-most popular tags, each with 700 or more uses (well, S-o-b was already checked for case-sensitivity and typos, leaving only 5 new tags being checked), as determined by: $ git log | sed -n 's/^ *\([A-Za-z-]*-by:\).*/\1/p' | \ sort | uniq -c | sort -k1,1n | tail Most of the rejected lines were obvious typos (among others, we've had 4 cases of someone being burnt, based on Singed-off-by; and 2 cases of list-reading via an e-reader, based on eviewed-by; there are also lines forgetting a space after the ':') or otherwise tongue-in-check (3 Approximately-suggested-by). A few lines not whitelisted here may be legitimate, but as they are orders of magnitude rarer, it is therefore not worth worrying about (7 Requested-by, 3 Co-authored-by, 1 Inspired-by, etc.). Signed-off-by: Eric Blake --- scripts/checkpatch.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 88682cb0a9f..51d55f80621 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1456,7 +1456,7 @@ sub process { ERROR("Author email address is mangled by the mailing list\n" . $her= ecurr); } -#check the patch for a signoff: +#check the patch for a signoff, and that other attribution lines are typic= al: if ($line =3D~ /^\s*signed-off-by:/i) { # This is a signoff, if ugly, so do not double report. $signoff++; @@ -1470,6 +1470,10 @@ sub process { ERROR("space required after Signed-off-by:\n" . $herecurr); } + } elsif($line =3D~ /^\s*([A-Za-z-])*-by:/ && + ($1 !~ /(Suggest|Report|Test|Ack|Review)ed/ || + $line !~ /^\s[a-z-]*-by:\S/i)) { + WARN("suspicious attribution tag:\n" . $herecurr); } # Check if MAINTAINERS is being updated. If so, there's probably no need = to --=20 2.20.1