Annotations are created when a problem matcher detects a match in the CI log. Problem matchers are enabled by default by some actions like
You can disable the annotations by executing the remove-matcher
command.
Eslint/Typescript (setup-node)
Add the following to your action after setup-node
For eslint
- run: |
echo "::remove-matcher owner=eslint-compact::"
echo "::remove-matcher owner=eslint-stylish::"
For Typescript
- run: |
echo "::remove-matcher owner=tsc::"
That should do it.
You can read more about Adding/Removing problem matchers here. https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers
Related links:
Bonus
Action Eslint is a Github Action that runs on the changed files in a PR.
jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
- run: npm ci
- uses: sibiraj-s/action-eslint@v1
with:
eslintArgs: '--ignore-path .gitignore --quiet'
extensions: 'js, jsx, ts, tsx'
annotations: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
You can disable annotations by setting the input value to false
.
Disable Annotations for Other Actions
Golang (setup-go)
- run: |
echo "::remove-matcher owner=go::"
Python (setup-python)
- run: |
echo "::remove-matcher owner=python::"
dotnet (setup-dotnet)
- run: |
echo "::remove-matcher owner=csc::"
java (setup-java)
- run: |
echo "::remove-matcher owner=csc::"
Hope that helps.
Good day 👋
Top comments (0)