Disable annotations from GitHub actions when reviewing a PR #212672
Replies: 4 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
Those annotations aren't produced by the Static Analysis step itself. They come from You can turn that off in the workflow and keep the warnings in the log. Option 1: upgrade to - name: Set up JDK 25
uses: actions/setup-java@v6
with:
distribution: 'zulu'
java-version: 25
problem-matcher: falseOption 2: stay on v5 and unregister the matchers right after setup: - name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 25
- name: Disable compiler-warning annotations
run: |
echo "::remove-matcher owner=maven-javac::"
echo "::remove-matcher owner=javac::"Option 2 keeps the The warnings are still in the job log, and the job still fails if the build fails, so you don't lose the static-analysis signal. It just stops being painted over the diff. References
|
|
the deprecation warnings from The root cause is that The cleanest fix is to disable matcher registration at the source: - uses: actions/setup-java@v4
with:
problem-matcher: falseIf you can't change the action input, you can remove the matcher mid-workflow: - run: echo "::remove-matcher owner=java::"One thing to keep in mind: without matchers, the log lines still appear in the raw workflow log — they just won't render as inline annotations in the diff. So you can still find the warnings if you need them, but the PR view stays clean. The only link I can safely point you to is https://github.com/actions/setup-java, where the |
|
Thank you! It solved the problem. But it shouldn't have been enabled in the first place so I have added a bug report about it, actions/setup-java#1322. And while it solves the problem for new PRs, it doesn't solve the problem for existing PRs. So I still have the problem for https://github.com/JMRI/JMRI/pull/15758/changes. |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Product Feedback
Body
The annotations from GitHub actions in the source code is a real pain when reviewing a PR. It makes the Java code really difficult to read and is completely useless to me. The review process has become much much harder with these annotations. It's a pain.
This image is from https://github.com/JMRI/JMRI/pull/15758/changes,
the
file java/src/jmri/implementation/DefaultSection.java.We have a GitHub action
Static Analysis Java25which gives these warnings.But I don't want these annotations when reviewing a PR.
All reactions