Fix scripts/errorCheck.mjs (#57399)
This commit is contained in:
Родитель
2a0edf7949
Коммит
23960ac88c
|
@ -19,18 +19,16 @@ async function checkErrorBaselines() {
|
|||
|
||||
const files = (await fsPromises.readdir(baseDir)).filter(f => f.endsWith(".errors.txt"));
|
||||
|
||||
files.forEach(f => {
|
||||
fs.readFile(baseDir + f, "utf-8", (err, baseline) => {
|
||||
if (err) throw err;
|
||||
for (const f of files) {
|
||||
const baseline = fs.readFileSync(baseDir + f, "utf-8");
|
||||
|
||||
let g;
|
||||
while (g = errRegex.exec(baseline)) {
|
||||
const errCode = +g[1];
|
||||
const msg = keys.filter(k => messages[k].code === errCode)[0];
|
||||
messages[msg].seen = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
let g;
|
||||
while (g = errRegex.exec(baseline)) {
|
||||
const errCode = +g[1];
|
||||
const msg = keys.filter(k => messages[k].code === errCode)[0];
|
||||
messages[msg].seen = true;
|
||||
}
|
||||
}
|
||||
|
||||
console.log("== List of errors not present in baselines ==");
|
||||
let count = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче