From patchwork Tue Jan 7 15:44:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 2519 Return-Path: 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 77C2460464 for ; Tue, 7 Jan 2020 16:44:46 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DF42552F; Tue, 7 Jan 2020 16:44:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1578411886; bh=rBBlI4mYdbWM4p9vmYtcPLVzAc7hUNGByo3UpLOzamA=; h=From:To:Cc:Subject:Date:From; b=Hh6XimIPL+VF46p6a3nJoYh1HsHr+rQ1b4ewLPPJn2VnD+LL7EmPppKcadyzfoS8B 5DwCh+xM8vtxcgRrtFrLPrOGz9e3CnlTvX30aSKPid2SD4CmK/S/TdMTiTYD1Hv0LE pKK6AqBKdPahpsCLns1c3NvGmEPXaDjUNcNVQ6uI= From: Kieran Bingham To: LibCamera Devel Date: Tue, 7 Jan 2020 15:44:39 +0000 Message-Id: <20200107154442.17372-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/2] utils: checkstyle: Two checkstyle fixes 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: , X-List-Received-Date: Tue, 07 Jan 2020 15:44:46 -0000 While applying a patch containing a short hunk (a single line addition to a file with a single line), an error was observied in the checkstyle hunk parsing. This was easily fixed by updating the regex to support optionally specifiying the line count of a hunk (it's not provided when only a single line is in the hunk). Doing so, and creating a commit for this, caused checkstyle.py to run checkstyle.py on it's own regex parser which identified an issue in the string literals, with a deprecated escape format usage. This is fixed as a preceeding commit for the single line hunk support. Note that the *output* hunks produced do still provide the line count for single line hunks. Updating this can be handled later if required, but is expected to be optional, as they are usually only consumed by humans currently. Kieran Bingham (2): utils: checkstyle.py: Fix regex string literal utils: checkstyle.py: Support single line hunks utils/checkstyle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)