Annotations are added when problem matchers finds a match in the logs.
For example. setup-node
registers eslint problem matchers. which can be removed by
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'
- run: |
echo "::remove-matcher owner=eslint-compact::"
echo "::remove-matcher owner=eslint-stylish::"
You can also you the eslint action I wrote, that runs linter on changed files. https://github.com/sibiraj-s/action-eslint. You can disable annotations by passing input args annotations: false
name: Lint
on:
pull_request:
push:
branches:
- master
jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- run: npm ci # or yarn install
- uses: sibiraj-s/action-eslint@v1
with:
extensions: 'js, jsx, ts, tsx'
annotations: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Read more about problem matchers here
https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers
Medium article for disabling annotations in other actions as well. https://sibiraj-s.medium.com/disable-annotations-in-github-actions-ff938d5ea4f3