From patchwork Fri Feb 12 11:09:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11251 X-Patchwork-Delegate: niklas.soderlund@ragnatech.se Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 5F378BD160 for ; Fri, 12 Feb 2021 11:09:57 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D40B263771; Fri, 12 Feb 2021 12:09:56 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="toRaT1+U"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 068C361628 for ; Fri, 12 Feb 2021 12:09:56 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 046248B5 for ; Fri, 12 Feb 2021 12:09:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613128195; bh=SUlkGqMM+d6ru7OEjf0oqZIqOpF+8iC2Y0GSndO5d58=; h=From:To:Subject:Date:From; b=toRaT1+Un6lsz0szgJHzJdvOy0MKw3dJuZ7m6p4TnhP+TL1/LQ8J70p8nEWKyS1Wj JckWf6hMYh5cZNR9KXVLzE0pnWqOb+Gy5LhzbKrIp0/uGhpb8jXm2xqH51ekBrDj/V PItjjq6ffjvb22uLjlXCxEFWH2X2qqAFadlmekww= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 12 Feb 2021 13:09:25 +0200 Message-Id: <20210212110926.6766-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] utils: checkstyle.py: Restore checks of renamed files X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Commit fc91951250ca ("utils: checkstyle.py: Add ability to filter files by status in a commit") caused all renamed files to be ignored by the checker. Fix it. Fixes: fc91951250ca ("utils: checkstyle.py: Add ability to filter files by status in a commit") Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- utils/checkstyle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/checkstyle.py b/utils/checkstyle.py index fb9366f8095d..93a4fc70fafa 100755 --- a/utils/checkstyle.py +++ b/utils/checkstyle.py @@ -214,7 +214,7 @@ class Commit: self._files = [CommitFile(f) for f in files[1:]] self._title = files[0] - def files(self, filter='AM'): + def files(self, filter='AMR'): return [f.filename for f in self._files if f.status in filter] @property From patchwork Fri Feb 12 11:09:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11252 X-Patchwork-Delegate: niklas.soderlund@ragnatech.se Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 6D091BD160 for ; Fri, 12 Feb 2021 11:09:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3AF0763775; Fri, 12 Feb 2021 12:09:59 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Jw0rt9eM"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E158063772 for ; Fri, 12 Feb 2021 12:09:56 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0ACBCA49 for ; Fri, 12 Feb 2021 12:09:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613128196; bh=s5XVfGqQGKCp2IL4e2w538XCVWDgNZ7DNWxlaIH2XPY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Jw0rt9eMxzgK3SsaEqmPCOtgxOK7+1koOQ54DM8C8KWKxWYONUNfoM5K4ufNqzT0U TfLPUrIQV+WX6WQ/zStPr0jNq8yrnh5JNz2gmq4Eh2u95LDXL/XjmOzWKsyPbTSNiW X026HyPHuc6IJ41H8LP1ahOH6DuhF8SRQEChatLc= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 12 Feb 2021 13:09:26 +0200 Message-Id: <20210212110926.6766-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210212110926.6766-1-laurent.pinchart@ideasonboard.com> References: <20210212110926.6766-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] utils: checkstyle.py: Handle renamed files in header add checker X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The header add checker only handles added header, which makes it miss issues when a header is renamed. Fix it. Fixes: 8fffab46b80f ("utils: checkstyle.py: Add header add checker") Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- utils/checkstyle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/checkstyle.py b/utils/checkstyle.py index 93a4fc70fafa..ececb46eaacc 100755 --- a/utils/checkstyle.py +++ b/utils/checkstyle.py @@ -314,7 +314,7 @@ class HeaderAddChecker(CommitChecker): meson_files = [f for f in commit.files('M') if os.path.basename(f) == 'meson.build'] - for filename in commit.files('A'): + for filename in commit.files('AR'): if not filename.startswith('include/libcamera/') or \ not filename.endswith('.h'): continue