Skip to content

Add an option to disable Java problem matchers#1133

Merged
brunoborges merged 3 commits into
actions:mainfrom
brunoborges:brunoborges-configure-problem-matcher
Jul 16, 2026
Merged

Add an option to disable Java problem matchers#1133
brunoborges merged 3 commits into
actions:mainfrom
brunoborges:brunoborges-configure-problem-matcher

Conversation

@brunoborges

Copy link
Copy Markdown
Contributor

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-matcher input, 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:

  • Ran npm run check locally (format, lint, build, test) and all checks pass.
  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 38eb7886-7ea3-4e4d-8d5f-e3f975135053
Copilot AI review requested due to automatic review settings July 16, 2026 15:05
@brunoborges
brunoborges requested a review from a team as a code owner July 16, 2026 15:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-matcher input (default true) and gates matcher registration behind it.
  • Adds a dedicated configureProblemMatcher helper plus unit tests for enabled/disabled behavior.
  • Updates docs to describe matcher behavior/owners and refreshes Maven examples (removing -B in 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

Comment thread action.yml Outdated
Comment thread README.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 7/9 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment thread README.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@brunoborges
brunoborges merged commit e40a8e0 into actions:main Jul 16, 2026
439 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants