File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -19,18 +19,16 @@ async function checkErrorBaselines() {
19
19
20
20
const files = ( await fsPromises . readdir ( baseDir ) ) . filter ( f => f . endsWith ( ".errors.txt" ) ) ;
21
21
22
- files . forEach ( f => {
23
- fs . readFile ( baseDir + f , "utf-8" , ( err , baseline ) => {
24
- if ( err ) throw err ;
22
+ for ( const f of files ) {
23
+ const baseline = fs . readFileSync ( baseDir + f , "utf-8" ) ;
25
24
26
- let g ;
27
- while ( g = errRegex . exec ( baseline ) ) {
28
- const errCode = + g [ 1 ] ;
29
- const msg = keys . filter ( k => messages [ k ] . code === errCode ) [ 0 ] ;
30
- messages [ msg ] . seen = true ;
31
- }
32
- } ) ;
33
- } ) ;
25
+ let g ;
26
+ while ( g = errRegex . exec ( baseline ) ) {
27
+ const errCode = + g [ 1 ] ;
28
+ const msg = keys . filter ( k => messages [ k ] . code === errCode ) [ 0 ] ;
29
+ messages [ msg ] . seen = true ;
30
+ }
31
+ }
34
32
35
33
console . log ( "== List of errors not present in baselines ==" ) ;
36
34
let count = 0 ;
You can’t perform that action at this time.
0 commit comments