What is the purpose of adding a problem matcher (for example via ::add-matcher::) in a GitHub Actions job?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Problem matchers are regex recipes: they watch tool stdout and turn matches into file/line severity annotations. They do not change shells, register runners, or replace CODEOWNERS reviews.
Full explanation below image
Full Explanation
Problem matchers are JSON definitions that describe regular expressions for compiler or linter output. When registered with ::add-matcher::path-to-matcher.json, the runner scans subsequent stdout/stderr and emits annotations for captures such as file, line, column, severity, and message. setup actions (for example setup-python or setup-node ecosystems) often register matchers so native tool errors appear in the PR UI without manual ::error:: echoes. Matchers do not alter the shell used by run steps, do not enroll self-hosted runners, and have no relationship to CODEOWNERS review rules. You can remove a matcher with ::remove-matcher::owner=.... Custom matchers are useful for in-house CLIs; keep regexes precise to avoid noisy false annotations that confuse developers.