fix(java): use PMD -f text instead of unparseable textcolor - #710
Open
scr963 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
desloppify scanon a Java project reportspmd tooling unavailable (tool_failed_unparsed_output)even when PMD 7 is installed and on PATH. The java language module runspmd check ... -f textcolorbut declaresfmt: "gnu"for the detector — textcolor emits a multi-line human report that the gnu parser cannot read, so every PMD scan fails as "unparsed output" and the pmd_violation detector silently reports nothing.Command used:
desloppify scan --path .in a Java/Gradle project with PMD 7.26 installed via Homebrew.Fix
Change the format flag from
textcolortotextinPMD_COMMAND(desloppify/languages/java/init.py).pmd check -f textemits one-linefile:line:\trule:\tmessagerecords that the gnu parser consumes correctly.Verified against a scratch Java project: with the fix, the pmd tool step completes and UnusedPrivateField/ControlStatementBraces violations are detected; no coverage-reduced warning. Full test suite: 5660 passed; the 3 failing tests in
test_bash_unused_imports.pyfail identically on main (pre-existing, unrelated).