https://github.com/xt0rted/problem-matcher
A GitHub Actions template to easily add or remove a problem matcher to workflows
https://github.com/xt0rted/problem-matcher
actions-template annotations github-actions github-actions-template problem-matcher repository-template
Last synced: over 1 year ago
JSON representation
A GitHub Actions template to easily add or remove a problem matcher to workflows
- Host: GitHub
- URL: https://github.com/xt0rted/problem-matcher
- Owner: xt0rted
- License: mit
- Created: 2020-02-17T13:37:04.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-04-29T03:01:56.000Z (about 2 years ago)
- Last Synced: 2024-05-01T21:50:31.606Z (about 2 years ago)
- Topics: actions-template, annotations, github-actions, github-actions-template, problem-matcher, repository-template
- Language: TypeScript
- Homepage:
- Size: 2.49 MB
- Stars: 8
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Actions Problem Matcher
[](https://github.com/xt0rted/problem-matcher/actions/workflows/ci.yml)
[](https://github.com/xt0rted/problem-matcher/actions/workflows/codeql-analysis.yml)
A GitHub Actions template to easily add or remove a problem matcher to workflows.
## Setup
This template has been designed so the only code change you should have to make is in [problem-matcher.json](/src/problem-matcher.json) and optionally the tests for it.
When editing the `problem-matcher.json` you should set the owner name to the application and/or report style being matched.
Examples of this are `eslint`, `eslint-compact`, or `eslint-stylish`.
Make sure to also update the `action.yml` and `package.json` files.
Sometimes report messages might not include a line or column number and your regular expression doesn't pick those lines up.
To help avoid those situations tests are provided to give coverage to the regular expression.
A useful resource to view and test your regular expression is [regex101.com](https://regex101.com/).
## Usage
```yml
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: xt0rted/problem-matcher@v1
- run: echo "Run some tests that will be picked up"
- uses: xt0rted/problem-matcher@v1
with:
action: remove
- run: echo "Run some more tests that shouldn't be picked up"
```
## Options
Name | Allowed values | Description
-- | -- | --
`action` | `add` (default), `remove` | If the problem matcher should be registered or removed
## License
The scripts and documentation in this project are released under the [MIT License](LICENSE)