Update Checkstyle for new tool support and improved configuration.
Review Request #11584 — Created April 8, 2021 and updated
CheckstyleToolto subclass the newer
BaseTool, and to
use the newer features it offers (dependencies, improved file extension
handling, centralized base command building, new comment options, and
Java tool mixin).
Configuration for checkstyle has improved. It previously required a full
XML file body to be set, which was a lot to manage. Now, to simplify
things, we also allow a Checkstyle-bundled XML file to be specified
sun_checks.xml). If provided, we'll use that
instead of assuming the content is an XML document body.
They could also potentially drop a
.jarfile in the class path with
XML files, and reference that in the
Parsing has improved, handling syntax errors with configurations or
source code and leaving a suitable comment. For other errors, we now
include column, severity, and error code information in the comment.
Python 3 compatibility was also fixed.
called with a Unicode string for the configuration contents, but
requires a byte string.
Unit tests pass on Python 2.7 and 3.x.