Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp70206pxb; Wed, 13 Jan 2021 23:38:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQrAuJknZInfXlABwcZ9Gb0X50iuGXwWIZgJGm2vYKMjyTn545Q6FahL7+zIRVpXjZ1Pkl X-Received: by 2002:a05:6402:31bb:: with SMTP id dj27mr4772202edb.285.1610609903040; Wed, 13 Jan 2021 23:38:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610609903; cv=none; d=google.com; s=arc-20160816; b=nHYnvywQvX6H/KaHZRYVfcJopK9bDMIQsPMPArBW9z1qB2FLc8aEzDEWtWWi85/Ccv yIT34KFVbc8BRTmNLj39rh+Th3F1GORpBC6sCuLeTA+s6dWkc9iTup1RD2iYogzHWIKQ sZK5q/9p7BdzGjdhRK/ORTookuOp0Z0urvyKQzgDd1HSybmlr5f+MLw3CkZ6MfJ+nEe8 eTDjcegeVKSYTU2uaLgSKLT5/44sFtigrvMXAc28qBTSUz7qfzitcQEVlV7kLJHnGixG WMuulM3zwuVS0ArHxGJJZ8BAijIJWg9utwkAOBHEPUxkhuj67LNfmO9T7qtCphLPDs6j dEFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=w8R51QsrEKDLwADFp2JX2ohNQRA7wXsnzFQpBQunQhU=; b=wYM/MtbjlAVXRj/mHwuhk6nJtPYOqgnzwOe6uIpIhFolvWlaAdyt7qIcv+TNonraVv rF5IXmm713GhgxXtMCo/o65wCl7tnsvL2Hl0/u9mR3p5o9dADk0H8t10A9O3nAzgKodu QHkHCcuhjyXWIElMuHD56y979RTNDCNq0LCHgVY8nZEo/CgpOWBprlA7prN7Hgyampe5 R/oB19qrevvkR2gDyySIuLppWrIhjugdfHN2ELSXanIVgl+oGhPMDONIs8X9KiK3/DTI GqZhWpE8cS/Tt5Z8ZTGz8G04dsev0TOpZtcZ/t6zAnGu6syXr23AoAxWdCnL1qADRImq U+5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cZqclifF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si2017518edh.221.2021.01.13.23.37.59; Wed, 13 Jan 2021 23:38:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cZqclifF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726821AbhANHgF (ORCPT + 99 others); Thu, 14 Jan 2021 02:36:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbhANHgE (ORCPT ); Thu, 14 Jan 2021 02:36:04 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12E20C061794 for ; Wed, 13 Jan 2021 23:35:24 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id l23so2729982pjg.1 for ; Wed, 13 Jan 2021 23:35:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=w8R51QsrEKDLwADFp2JX2ohNQRA7wXsnzFQpBQunQhU=; b=cZqclifFJtPeQhDZPhpEEJ67qPONAeZqsxzJ7IEigeCotI3xy/DfkkfjLL4jx8N8VP Z9UmvIyKDymt2SFDMo5QUdqkpUUTIUatXKwOR9eZeWdhk8/lCcLtCH/9IZM0sO0VSB4O H126G7x1Xsdj2jO4fTSzf7ux3/bsU8PnvV5QrCRT4focInfezml69jwo1vPrciruoyog iexyJYD2ZQ52IDf+K7JxDc6qLy8kkmQ/TplNKfi5fd+jPYiLY2urWvzMDDsTGegvKpda SLwtxO15rr188Be3QZo2oSkBjPtD1SRekfFurLlSIeXXmz892bqBF/vJcYkq+6iRakwc NvJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=w8R51QsrEKDLwADFp2JX2ohNQRA7wXsnzFQpBQunQhU=; b=RhH37eoZ17GNb9ykjKBTIy5hI7NAbuK6bxQhsB+Eh7zKQIxz+QHPYihwiDXa2a60JT leP2H60JezWEwD4nWzlRKSYKdeej4GWiK3MsVZYWFwKN/DXQwV0k8nUAk03KyWU4RL0O LWz1FMU26Bj6VnyiQppv+oqCwKEFv4V0UxT7CLtUNggVRHLU1l2AUObpgvUcC1kVdT0J nssGQga8574PVtBgW+xf409/QbpCmvJLcvkgXjlc8AnZwUpShBP0L6ZKMY8ZbMv1kNNO rdPzZOjwiWVr7KLZ7yew44zboxFYnIY357WLglD9NhPPHGds2wADCmBnLHS34AftspMj muPw== X-Gm-Message-State: AOAM533Uh3/2FRaEedQc/pC6WuKNYEdWbr8wqB4fvtR0v6h2sgrJLRrn Aj/lthU4liipB5rNN7vanZU= X-Received: by 2002:a17:90b:3805:: with SMTP id mq5mr3671543pjb.93.1610609723619; Wed, 13 Jan 2021 23:35:23 -0800 (PST) Received: from localhost.localdomain ([2405:201:600d:a089:b1fd:acc0:2bb9:df96]) by smtp.googlemail.com with ESMTPSA id x20sm4442145pfc.3.2021.01.13.23.35.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 23:35:23 -0800 (PST) From: Aditya Srivastava To: joe@perches.com Cc: yashsri421@gmail.com, lukas.bulwahn@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/2] checkpatch: fix false positive for COMMIT_LOG_LONG_LINE and provide fix Date: Thu, 14 Jan 2021 13:05:11 +0530 Message-Id: <20210114073513.15773-1-yashsri421@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <84492ae9-7452-d296-49ab-4d37eed3b968@gmail.com> References: <84492ae9-7452-d296-49ab-4d37eed3b968@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, checkpatch gives COMMIT_LOG_LONG_LINE warning even for URL lines, which should be avoided. An evaluation over v5.6..v5.8 found that out of 1703 warnings reported by this class, 161 are due to the line containg URLs. Out of these 161, 53 are due to lines where URL is the first non-whitespace character of the line. Fix this false positive by suggesting to prefix the URL with "Link:". Also provide the fix option to the user. * Applies perfectly on next-20210108 Changes in v2: - Fix coding style ('} else {') - Make the URL check follow RFC 3986 style - Give warning only if the URL is first non-whitespace of the line - Set $commit_log_long_line only for else case - Fix the warning count with exact figures and according to first non-space char as URL Changes in v3: - Provide fix option for the warning - Update the warning count with v5.6..v5.8 - Update regex with /^\s*[a-z][\w\.\+\-]*:\/\/\S+/i (earlier: /^\s*\b[a-z][\w\.\+\-]*:\/\/\S+/i) Aditya Srivastava (2): checkpatch: fix false positive for COMMIT_LOG_LONG_LINE with URLs checkpatch: add fix option for COMMIT_LOG_LONG_LINE with URLs scripts/checkpatch.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) -- 2.17.1