Add an option to disable Java problem matchers#1133
Merged
brunoborges merged 3 commits intoJul 16, 2026
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 38eb7886-7ea3-4e4d-8d5f-e3f975135053
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new user-facing input to control whether setup-java registers the Java problem matcher, to help avoid hitting GitHub Actions annotation limits while keeping default behavior unchanged.
Changes:
- Introduces a
problem-matcherinput (defaulttrue) and gates matcher registration behind it. - Adds a dedicated
configureProblemMatcherhelper plus unit tests for enabled/disabled behavior. - Updates docs to describe matcher behavior/owners and refreshes Maven examples (removing
-Bin places given generated settings are non-interactive).
Show a summary per file
| File | Description |
|---|---|
| src/setup-java.ts | Switches matcher registration to a new helper that can be disabled via input. |
| src/problem-matcher.ts | New helper that conditionally registers the Java matcher based on problem-matcher. |
| src/constants.ts | Adds INPUT_PROBLEM_MATCHER constant. |
| README.md | Documents the new problem-matcher input and updates a Maven example. |
| docs/advanced-usage.md | Expands problem matcher docs (owners/limits) and simplifies Maven examples/notes. |
| action.yml | Adds the new problem-matcher input definition. |
| tests/problem-matcher.test.ts | Adds unit coverage for default-enabled and disabled behavior. |
| dist/setup/index.js | Bundled output reflecting the new input and helper. |
| dist/cleanup/index.js | Bundled output reflecting the new input constant. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 7/9 changed files
- Comments generated: 2
- Review effort level: Low
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Description:
GitHub Actions displays only a limited number of annotations per step, so Java compilation failures can quickly exceed the problem matcher limit. Add a
problem-matcherinput, enabled by default for compatibility, that lets users skip matcher registration when annotations are not useful.Document the annotation limits and all matcher owners, add unit coverage for enabled and disabled behavior, and simplify Maven examples now that generated settings disable interactive mode automatically.
Related issue:
N/A
Check list:
npm run checklocally (format, lint, build, test) and all checks pass.