microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.67k stars 28.68k forks source link

Task Manager: provide the ability to reuse custom problem matchers #61497

Open josh-stoddard-tanium opened 5 years ago

josh-stoddard-tanium commented 5 years ago

I have several related tasks that share a custom output format. I'd like to be able to define a problem matcher for this format once and reference it in multiple tasks like I can for built-in matchers, eg. "problemMatcher": "$my-matcher".

vscodebot[bot] commented 5 years ago

(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

dbaeumer commented 5 years ago

This is only possible using an extension. You can provide an extension that contributes problem matchers which then can be referenced via a string. See https://marketplace.visualstudio.com/items?itemName=eamodio.tsl-problem-matcher as an example.

Keeping the issue open to be able to do the same in tasks.json files.

psukys commented 5 years ago

How are problemmatcher conflicts resolved (i.e. two ProblemMatchers having the same name) at the moment?

dbaeumer commented 5 years ago

The extension that got parsed last wins. In this regard it might not be obvious for the user.

juliancarrivick commented 5 years ago

I would find this especially useful in a monorepo. e.g. an Angular repo with many projects where the same task would be reused across each project except with a different base path.

junalmeida commented 3 years ago

This feature request is open since 2018, will it be addressed anytime soon?

farrrb commented 3 years ago

I also think that this would be a great addition!

willson556 commented 8 months ago

A nice solution for this would be to allow specifying problem matchers from a JSON file, ideally matching the GitHub format: https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md