Fix string type issues and result assumptions in Shellcheck and PMD.

Review Request #12958 — Created April 17, 2023 and submitted — Latest diff uploaded

Information

ReviewBot
release-3.x

Reviewers

We had some string mismatch issues that specifically affected
Shellcheck's usage, due to some of the capabilities used in the tool.
Byte strings were expected but Unicode strings returned. This change
fixes those up, as part of a larger block of work to add more strict
string type checks throughout the codebase.

PMD also had a regression due to changes for better error parsing. Some
code was removed that would have bailed out earlier if no files were
returned. This left a check in place to make sure there was only 1 file
in the results, which would fail if the report was empty. This case is
once again handled.

Unit tests pass.

Verified the fix with a customer.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Fix string type issues and result assumptions in Shellcheck and PMD.
We had some string mismatch issues that specifically affected Shellcheck's usage, due to some of the capabilities used in the tool. Byte strings were expected but Unicode strings returned. This change fixes those up, as part of a larger block of work to add more strict string type checks throughout the codebase. PMD also had a regression due to changes for better error parsing. Some code was removed that would have bailed out earlier if no files were returned. This left a check in place to make sure there was only 1 file in the results, which would fail if the report was empty. This case is once again handled.
c8d20e9472a916c39329e414dc74315141283879 Christian Hammond
bot/reviewbot/processing/review.py
bot/reviewbot/tools/pmd.py
bot/reviewbot/tools/shellcheck.py
Loading...