question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

problem matcher that clears only for changed files

See original GitHub issue

I have a watch task that runs various per-file checks (lint, appropriate tests, etc). When it starts up, it runs those checks for all files in the project. Thereafter, it only runs checks on files that change.

For the most part, it works great; but the one limitation I’m running into is that all problems for a particular matcher are cleared on a run.

For example:

  1. I boot up the watch task, and there are problems on foo.js and bar.js. The problem matcher picks up on all of these.

  2. I make a change to foo.js:

    a. The watch task re-runs checks for just foo.js. b. The problem matcher notices that a re-run has occurred, and blows away all problems of that type c. Only problems for foo.js are listed, even though bar.js still has issues.

I’d like to avoid building a language server or plugin for this if I can (the watch task is very useful to non VS code users on the team; and problem matchers are wonderfully simple).

Or maybe we could have an option for only clearing problems for files that have changed (or that match a particular expression?)

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dbaeumercommented, Apr 25, 2017

Keeping as a feature request to allow watching patterns on a per file bases.

0reactions
nevircommented, Jun 29, 2016

@nevir how did you configure the task. Is if configured as a watching task then this should not happened (e.g does it have a “watching” property). If not the task framework always assume that all files are validated and all valid errors are rereported. Otherwise errors would never be cleared in cases where you have inter file dependencies.

Yeah, I had it configured as a watch task. The difference here, I think, is that the task itself only ran against files that changed (rather than the entire project, as most watch tasks tend to, and VS Code seems to rightly assume)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I modify fileLocation for problemMatcher? - Stack Overflow
The problem is when the ProblemMatcher is set to $gcc , it returns full path of remote server, so it can't be matched...
Read more >
Tasks in Visual Studio Code
Note: The problem matcher only parses output from the given command. If you want to parse output written to separate file (e.g. a...
Read more >
Save disk space with OneDrive Files On-Demand for Mac
Mark a file or folder for offline use or as online-only. You'll see the following new options when selecting files or folders in...
Read more >
VSCode Tasks Problem Matchers - Allison Thackston
First, you should understand just what the problem matcher is. In the panels beneath your code, there is a “Problems” panel. vscode problems...
Read more >
Task.json error on base:gcc - Toradex Community
Error: the description can't be converted into a problem matcher: { "base": ... Just to be clear I'm running the Early Access version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found