Annotate javac warnings from the build job only - #100
Merged
Merged
Conversation
setup-java's problem matcher turns javac's warnings, Error Prone's among them, into annotations on the diff, and it is on by default. It was on in every job that compiles the same sources: build, the three newer JDKs, the five native platforms and both CodeQL analyses. Windows never annotated, because the matcher's pattern takes no path with a colon in it. GitHub keeps only the first ten warnings of a step. The build prints 188, and as it runs in parallel, each job prints them in its own order and keeps its own ten. So on #98 one warning showed up to ten times, the one next to it once, and most not at all. build keeps the matcher, now explicitly and with a comment saying why; every other setup-java step on a pull request passes problem-matcher: false. Each warning shows at most once, though still only the first ten the build prints.
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.
setup-java's problem matcher turns javac's warnings, Error Prone's among them, into annotations on the diff, and it is on by default. It was on in every job that compiles the same sources:
build, the three newer JDKs, the five native platforms and both CodeQL analyses. Windows never annotated, because the matcher's pattern takes no path with a colon in it.GitHub keeps only the first ten warnings of a step. The build prints 188 of them, and as it runs in parallel, each job prints them in its own order and keeps its own ten. That is why on #98 one warning shows up to ten times, the one next to it once, and most not at all. None of them come from #98: it adds no warning and removes one.
What changes
buildkeeps the matcher, now explicitly and with a comment saying why.setup-javastep that runs on a pull request, inci.ymlandcodeql-analysis.yml, passesproblem-matcher: false.release.ymlanddependency-submission.ymlnever run on one and are left as they are.Each warning now shows at most once. Still only ten show, the first the parallel build prints, so which ones appear depends on the build order rather than on the PR until the backlog is worked off: 107 of the 188 are NullAway's.
Checked
act --list), and everysetup-javastep has the setting above.build, once each.