SONARJAVA-5397 Support the import of custom checkstyle issues - #6059
Conversation
Code Review ✅ Approved 1 resolved / 1 findingsAdded support for importing custom checkstyle issues without the standard prefix in ✅ 1 resolved✅ Edge Case: Empty 'source' attribute no longer guarded, yields blank rule key
Implementation Status ✅ 2 of 2 objectives covered✅ SONARJAVA-5397 - 2 of 2 objectives coveredThis PR covers both objectives: reducing the Checkstyle rule key when the prefix is present, and importing issues even when they lack the prefix and rule description. ✅ 2 covered here
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|
vdiez
left a comment
There was a problem hiding this comment.
The implementation matches SONARJAVA-5397 and the linked customer report: it preserves the shortened IDs for built-in Checkstyle rules while allowing custom rule IDs through. I found no functional blocker.
Non-blocking suggestion: add regression coverage for an <error> with a missing or empty source. The guard added in dd442c5 is currently uncovered, even though the earlier review requested both the guard and a fixture. Placing such an element before a valid custom issue and asserting that import continues would protect this error-recovery behavior.
Validated locally with mvn -pl external-reports test -Dsonar.skip=true (30 tests passed); all PR checks are green.




Summary by Gitar
CheckstyleXmlReportReader.javaThis will update automatically on new commits.