#2123: configure Checkstyle suppression for legitimate System.out usages#2128
Open
maybeec wants to merge 2 commits into
Open
#2123: configure Checkstyle suppression for legitimate System.out usages#2128maybeec wants to merge 2 commits into
maybeec wants to merge 2 commits into
Conversation
Collaborator
Coverage Report for CI Build 28893927583Coverage decreased (-0.03%) to 72.095%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions78 previously-covered lines in 6 files lost coverage.
Coverage Stats💛 - Coveralls |
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.
This PR fixes #2123
Internal enhancement (developers only) — preparation for the linting harness, scoped to the
System.out/System.errCheckstyle rule. Labelledinternal, so no CHANGELOG entry.Implemented changes:
checkstyle.xml: gave theSystem.out/System.errrule the idSystemOutand added twosuppression mechanisms so legitimate usages no longer block the build:
SuppressWithNearbyCommentFilter— inline, single-line: a trailing// checkstyle:ignore SystemOut - reasonon the offending line (limited to that line only).SuppressionSingleFilter— whole-file, scoped to thelogpackage (the logging implementationlegitimately writes to
System.out/System.err); only theSystemOutrule is suppressed there.AbstractIdeContext(log just failed, point tologfile),
GraalVmHelper(native-image bootstrap before logging),CompleteCommandlet(bashcompletion must reach stdout),
Ideasy(option parsing before logger init),OperatingSystem(static OS detection, no context).
UrlSecurityFilenow logs via the SLF4J/jline logger; removedleftover debug prints from
PycharmTest,IntellijTest,FileAccessImplTest.EclipseWorkspaceLockChecker(+ its test): adopted the exactjava.io.File→java.nio.file.Pathand
System.out→ SLF4J-logger change from #2118: replace java.io.File usages with java.nio.file.Path #2120 so both branches merge without conflict.Out of scope and intentionally left as-is: the
printStackTraceviolation inIdeLogExceptionDetails(a different rule), and three furtherSystem.outsites already handled by#2120 / to be addressed with their respective rules.
Testing instructions
cli/, runmvn checkstyle:check— theSystem.out/System.errsites listed above no longerproduce violations (the remaining
printStackTraceinIdeLogExceptionDetailsis a differentrule and out of scope).
cli/, runmvn -Dtest=PycharmTest,IntellijTest,FileAccessImplTest,EclipseWorkspaceLockCheckerTest test— all pass.
mvn clean test— build is green.Checklist for this PR
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)internal— labelledinternal, no CHANGELOG entry needed