[libcamera-devel] [PATCH 0/2] utils: checkstyle: Two checkstyle fixes

Kieran Bingham kieran.bingham at ideasonboard.com
Tue Jan 7 16:44:39 CET 2020


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(-)

-- 
2.20.1



More information about the libcamera-devel mailing list