How to know the name of the problem matcher which I would like to remove?

As part of my CI, I run tsc with some erroneous TypeScript which I do expect to raise certain compilation errors. I compile them via a custom script so the exit code of my CI is correct. Nevertheless, for every CI run, GitHub adds an annotation when it detects the error by tsc:

I would like to get rid of this particular annotation as it does not make sense for my scenario. I already found out that the way to go is to use remove-matcher:

My problem is that I don’t know what’s the name of the relevant problem matcher for tsc.

  1. How can identify this name and
  2. could this maybe be documented somewhere, please? :slight_smile:

Thanks in advance!

According to the Problem Matchers Architecture Decision Record for the Runner:

For this to be usable, the owner needs to be discoverable. Therefore, debug print the owner on registration.

You can enable debugging in a Workflow by adding a Secret to the repository with the name ACTIONS_STEP_DEBUG and the value true (via enabling debug logging). Then, re-run your Workflow and search within the output for matcher and you’ll find…

::add-matcher::/home/runner/work/_actions/actions/checkout/v2/dist/problem-matcher.json
##[debug]Added matchers: 'checkout-git'. Problem matchers scan action output for known warning or error strings and report these inline.
[...]
::remove-matcher owner=checkout-git,::
##[debug]Removed matchers: 'checkout-git'

So in this example we can see that actions/checkout registers a git-checkout matcher and then removes it, using the command:

::remove-matcher owner=checkout-git,::
1 Like