Fix string type issues and result assumptions in Shellcheck and PMD.
Review Request #12958 — Created April 17, 2023 and submitted
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.
Updated to handle original/patched file content strings from the API as byte strings or Unicode strings, while supporting Python 2 and 3.
Revision 2 (+38 -12)
Checks run (2 succeeded)