You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
clear all problems from the owner
reset the state if it's currently after a beginsPattern but before an endsPattern
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.
The text was updated successfully, but these errors were encountered:
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
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”.
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:
beginsPattern
but before anendsPattern
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.The text was updated successfully, but these errors were encountered: