File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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' ) ;
You can’t perform that action at this time.
0 commit comments