Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex pattern to clear all problems of a task owner #73186

Open
justingrant opened this issue May 2, 2019 · 1 comment
Open

Regex pattern to clear all problems of a task owner #73186

justingrant opened this issue May 2, 2019 · 1 comment
Assignees
Labels
feature-request Request for new features or functionality tasks Task system issues
Milestone

Comments

@justingrant
Copy link
Contributor

justingrant commented May 2, 2019

Some compilers or build pipelines (e.g. create-react-app) emit different output if there are no errors vs. if there are 1+ errors or warnings. This makes it difficult to build problem matchers because start/end patterns need to have both a "errors" and a "no errors" version inside the same regex.

It would be better if there were a new pattern in task config (e.g. clearAllPattern) that, if found, would clear all existing problems from the current owner.

For non-background tasks this would be straightforward-- if the pattern is matched, then clear all problems from the owner and ignore all problems from the currently-executing task until the task exits.

For background tasks, it'd be a little more complicated:

  1. clear all problems from the owner
  2. reset the state if it's currently after a beginsPattern but before an endsPattern
  3. wait until the next beginsPattern before logging more problems.

As a side effect, this feature would provide an escape hatch for users who want to clear problems by running a task (#50448), because you could create a task with a clearAllPattern that always matches.

@justingrant justingrant changed the title Regex pattern to clear all problems of a task Regex pattern to clear all problems of a task owner May 2, 2019
@vscodebot vscodebot bot added the tasks Task system issues label May 2, 2019
@alexr00 alexr00 added the feature-request Request for new features or functionality label May 3, 2019
@alexr00 alexr00 added this to the Backlog milestone May 3, 2019
@acdha
Copy link

acdha commented May 21, 2019

I believe I have a good use-case for this improvement. I have task configuration for Gulp which captures SCSS & JS compilation errors. Most of the time this works but there's a race condition of some sort where something (maybe focus switching?) causes it to run while I'm in the middle of typing something and it reports an error (e.g. display: <EOL> must have a value) which will never clear without closing and re-opening the window, even though subsequent runs will have the usual error/fix/clear cycle.

There's probably some way to fix whatever condition causes the initial trigger but that seems like it would be a lot more complicated than having the task simply be able to say “any time we start a run, clear every previously-reported problem from this task”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality tasks Task system issues
Projects
None yet
Development

No branches or pull requests

4 participants