Skip to content
/ problem-matcher Public template

A GitHub Actions template to easily add or remove a problem matcher to workflows

License

Notifications You must be signed in to change notification settings

xt0rted/problem-matcher

Repository files navigation

GitHub Actions Problem Matcher

CI CodeQL

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 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.

Usage

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

Releases

No releases published

Sponsor this project

 

Contributors 4

  •  
  •  
  •  
  •