Update JSHint for new tool support and more reliable output parsing.
Review Request #11550 — Created March 23, 2021 and submitted
This updates
JSHintTool
to subclass the newerBaseTool
, and to use
the newer features it offers (dependencies, improved configurable file
extension handling, and centralized base command building, and
standardized error code/column output).The new version of the tool also passes a custom JSHint reporter that
returns simple JSON output containing only the information we need for
reporting. This eases parsing considerably, as we can guarantee that any
of the information we use for comments will be completely accurate.Unit tests were added to cover the new JSHint parsing, and to provide
integration tests. These currently require doing anpm install jshint
in thebot/
directory to run.
Unit tests pass on Python 2.7 and 3.x.
Manually tested the
jshint
tool with the custom reporter, and parsed
using that data.There are plans to add integration tests for tools down the road, but
that will require some additional work.
Summary | ID |
---|---|
a99d58287c5beb692890b5dd8709d9f9c48f511d |
- Change Summary:
-
Improved docs for
build_base_command
. - Commits:
-
Summary ID b8363418bd017c2e5dab850d55b5912620e0038b 303747a93562394b0426c6ebda58f589c18ff1d9
Checks run (2 succeeded)
- Change Summary:
-
Added integration tests for jshint.
- Description:
-
This updates
JSHintTool
to subclass the newerBaseTool
, and to usethe newer features it offers (dependencies, improved configurable file extension handling, and centralized base command building, and standardized error code/column output). The new version of the tool also passes a custom JSHint reporter that
returns simple JSON output containing only the information we need for reporting. This eases parsing considerably, as we can guarantee that any of the information we use for comments will be completely accurate. ~ Unit tests were added to cover the new JSHint parsing.
~ Unit tests were added to cover the new JSHint parsing, and to provide
+ integration tests. These currently require doing a npm install jshint
+ in the bot/
directory to run. - Commits:
-
Summary ID 303747a93562394b0426c6ebda58f589c18ff1d9 a99d58287c5beb692890b5dd8709d9f9c48f511d