Skip to content

Commit 861b0b3

Browse files
author
Dave Risney
committed
Don't show warnings so much
1 parent 03c11a3 commit 861b0b3

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/extension.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class BuildLogWatcher {
6060
}
6161
}
6262

63-
updateWatchersAndParseMostRecentLog(fileChanged = false) {
63+
getMatchedFiles(showWarnings = false) {
6464
const config = vscode.workspace.getConfiguration('watchbuildlog');
6565
const wildcards = config.get('logFilePathWildcards') || [];
6666
const problemPatterns = config.get('problemMatcherPatterns') || [];
@@ -80,7 +80,12 @@ class BuildLogWatcher {
8080
}
8181

8282
const matchedFiles = this.findMatchingFiles(wildcards, workspaceRoot);
83-
83+
return matchedFiles;
84+
}
85+
86+
updateWatchersAndParseMostRecentLog(fileChanged = false) {
87+
const matchedFiles = this.getMatchedFiles(false);
88+
8489
if (matchedFiles.length === 0) {
8590
vscode.window.showWarningMessage('No files found matching the configured wildcard patterns.');
8691
return;
@@ -151,6 +156,10 @@ class BuildLogWatcher {
151156
return;
152157
}
153158

159+
// We don't actually care about the results, but we run it to validate the config
160+
// and show warnings if there are config issues.
161+
this.getMatchedFiles(true);
162+
154163
this.updateWatchersAndParseMostRecentLog(true);
155164

156165
console.assert(!this.intervalId, 'Interval ID should not be set when starting to watch');

0 commit comments

Comments
 (0)