From nobody Tue Dec 16 07:06:25 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520981954696447.5742225138017; Tue, 13 Mar 2018 15:59:14 -0700 (PDT) Received: from localhost ([::1]:43334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evssz-0006ks-Rh for importer@patchew.org; Tue, 13 Mar 2018 18:59:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evshm-0005SZ-1a for qemu-devel@nongnu.org; Tue, 13 Mar 2018 18:47:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evshh-0002qh-SL for qemu-devel@nongnu.org; Tue, 13 Mar 2018 18:47:38 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:33092) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1evshh-0002ps-LR for qemu-devel@nongnu.org; Tue, 13 Mar 2018 18:47:33 -0400 Received: by mail-wm0-x243.google.com with SMTP id s206so16178239wme.0 for ; Tue, 13 Mar 2018 15:47:33 -0700 (PDT) Received: from donizetti.lan (94-36-191-219.adsl-ull.clienti.tiscali.it. [94.36.191.219]) by smtp.gmail.com with ESMTPSA id x107sm1557951wrb.97.2018.03.13.15.47.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Mar 2018 15:47:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=m8RBfumB60112apTP4Bf6c5RXnmdP7PYTGRPnDf5Wqs=; b=czrmb/k+6qimhUjGbMWoeEYh0CW3WYiHlSymDTrAZF9+NSyWMbCgc+zXCXKEKTMJjK cbhT3h0gUbUGzcOdD5YJqLfQ5sV3nB+cVWQJt8+pBq3ET3GtmmqtS3oQvGkrWvRr3pHn sZy/72uvmrvLNRBxB0A2/xy8mLkAAXLiSrsYAIMvXzsM7BdXdo48A+ArTym+GosAdO/p l3hklOEETDhWxVYk/zCROe6SQ5zTwaYrdf9RQUjBnRw4Sz549FiOSZUTLc8HnsgVz0l8 lqoZOAZdNj1luFx261Zuk409p4NSl+j2QViLCK8U8rabLG1aB2aJ1zQqUR5CnUZ4DSe+ L8Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=m8RBfumB60112apTP4Bf6c5RXnmdP7PYTGRPnDf5Wqs=; b=hW67Xbpdms0Yv+hD+6hsXpud/G6mI0NiyavJK3zh0YW0hpuKjcjtZrwQA9KbQkcoFk hSYVNbH0eiI6gMYATZqaovWBys3BoFp1GjsvnqKimnfYdIXC7n35eoMLmhsWeUOMDujt b1clYYYhAxlLoWAH/hScK3jmoVVaZRbktaPmwW7moPAUcqVnE1UJE59ldyzy8V6uQ+L/ aQzLk8iNv/MRjVK7oFZiOia+b0NvmmRzGUjlYeGijkWTxipIgbvVLHg5b4CxJj++IjrJ FLIW1HkLL/uSVpp7tVgY4YnWDN6orjXEbfCJLBntNu/6lquj7CcE5siijxIoCLiitqeK C7Dw== X-Gm-Message-State: AElRT7FgZ1yyCaqzPV1QQEBRV+ZlhaznkII8/oUVPeI6PDkMAe3hT82T +TYs2uQjciOjAeTbTfwCmkYhNDBc X-Google-Smtp-Source: AG47ELtSmjtuiGTrTqnFvO02GFFEPLfhTbSREOjQk1tRE/tWE7xmneGp740+qoZbiPWEidSi9ZghCA== X-Received: by 10.28.51.67 with SMTP id z64mr1965041wmz.59.1520981252194; Tue, 13 Mar 2018 15:47:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 13 Mar 2018 23:46:19 +0100 Message-Id: <20180313224719.4954-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180313224719.4954-1-pbonzini@redhat.com> References: <20180313224719.4954-1-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PULL 09/69] checkpatch: Exempt long URLs 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Eric Blake Sometimes, we want to refer to really long URLs, but checkpatch balks, and we have to manually bypass the check. URL shorteners may be nice at reducing long links, but it's hard to guarantee the shortened link will live as long as the real target, and it is also nice to see the original target without having to load the shortened URL through a browser. So exempt a line containing only a URL from the long-line syntax check. Reviewed-by: Stefan Hajnoczi Suggested-by: Peter Maydell Signed-off-by: Eric Blake Message-Id: <20180222215838.18223-1-eblake@redhat.com> Signed-off-by: Paolo Bonzini --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d1fe79bcc4..57daae05ea 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1447,9 +1447,10 @@ sub process { # check we are in a valid source file if not then ignore this hunk next if ($realfile !~ /$SrcFile/); =20 -#90 column limit +#90 column limit; exempt URLs, if no other words on line if ($line =3D~ /^\+/ && !($line =3D~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) && + !($rawline =3D~ /^[^[:alnum:]]*https?:\S*$/) && $length > 80) { if ($length > 90) { --=20 2.14.3