mirror of
https://github.com/actions/setup-java.git
synced 2026-11-14 13:10:34 +08:00
Make Java problem matcher opt-in (#1326)
Default the problem-matcher input to false so setup-java no longer registers Java compiler and uncaught-exception annotations unless explicitly enabled with problem-matcher: true. Fixes #1322 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot App
parent
5fb63c9bc9
commit
d1374f8ac7
@@ -27,7 +27,16 @@ describe('configureProblemMatcher', () => {
|
||||
jest.resetAllMocks();
|
||||
});
|
||||
|
||||
it('registers the Java problem matcher by default', () => {
|
||||
it('does not register the Java problem matcher by default', () => {
|
||||
configureProblemMatcher('/matchers/java.json');
|
||||
|
||||
expect(mockInfo).not.toHaveBeenCalled();
|
||||
expect(mockDebug).toHaveBeenCalledWith('Java problem matcher is disabled');
|
||||
});
|
||||
|
||||
it('registers the Java problem matcher when explicitly enabled', () => {
|
||||
inputs[INPUT_PROBLEM_MATCHER] = 'true';
|
||||
|
||||
configureProblemMatcher('/matchers/java.json');
|
||||
|
||||
expect(mockInfo).toHaveBeenCalledWith('##[add-matcher]/matchers/java.json');
|
||||
|
||||
Reference in New Issue
Block a user