From patchwork Mon Apr 16 20:00:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 898908 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40Pzkk03Qwz9s19 for ; Tue, 17 Apr 2018 06:00:14 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 009604A3; Mon, 16 Apr 2018 20:00:12 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id C88FE4A3 for ; Mon, 16 Apr 2018 20:00:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 3FBA7466 for ; Mon, 16 Apr 2018 20:00:10 +0000 (UTC) X-Originating-IP: 208.91.3.26 Received: from sigabrt.benpfaff.org (unknown [208.91.3.26]) (Authenticated sender: blp@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id E626040003; Mon, 16 Apr 2018 22:00:07 +0200 (CEST) From: Ben Pfaff To: dev@openvswitch.org Date: Mon, 16 Apr 2018 13:00:03 -0700 Message-Id: <20180416200003.3604-1-blp@ovn.org> X-Mailer: git-send-email 2.16.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff Subject: [ovs-dev] [PATCH v2] checkpatch: Don't do line length or whitespace checks on debian/rules. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org debian/rules is a Makefile with a funny name. Signed-off-by: Ben Pfaff Reviewed-by: Aaron Conole --- v1->v2; Avoid long line in checkpatch. utilities/checkpatch.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py index 0f389052c1f9..11f98389f986 100755 --- a/utilities/checkpatch.py +++ b/utilities/checkpatch.py @@ -165,13 +165,13 @@ skip_signoff_check = False # name, as they may have legitimate reasons to have longer lines. # # Python isn't checked as flake8 performs these checks during build. -line_length_blacklist = ['.am', '.at', 'etc', '.in', '.m4', '.mk', '.patch', - '.py'] +line_length_blacklist = re.compile( + r'\.(am|at|etc|in|m4|mk|patch|py)$|debian/rules') # Don't enforce a requirement that leading whitespace be all spaces on # files that include these characters in their name, since these kinds # of files need lines with leading tabs. -leading_whitespace_blacklist = ['.mk', '.am', '.at'] +leading_whitespace_blacklist = re.compile(r'\.(mk|am|at)$|debian/rules') def is_subtracted_line(line): @@ -379,13 +379,13 @@ def check_comment_spelling(line): checks = [ {'regex': None, 'match_name': - lambda x: not any([fmt in x for fmt in line_length_blacklist]), + lambda x: not line_length_blacklist.match(x), 'check': lambda x: line_length_check(x), 'print': lambda: print_warning("Line length is >79-characters long")}, {'regex': None, 'match_name': - lambda x: not any([fmt in x for fmt in leading_whitespace_blacklist]), + lambda x: not leading_whitespace_blacklist.match(x), 'check': lambda x: not leading_whitespace_is_spaces(x), 'print': lambda: print_warning("Line has non-spaces leading whitespace")},