From a9fc7c7bb587ae1bcce504b20fe5e1d16f6d0949 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Wed, 5 Oct 2022 18:02:16 -0700 Subject: [PATCH] Fix filtering of TS5055 (#81) See https://github.com/microsoft/TypeScript/pull/51076#issuecomment-1268973578 --- src/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 1baf1a2..ef6358d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -444,7 +444,9 @@ export async function getTscRepoResult( // TS 5055 generally indicates that the project can't be built twice in a row without cleaning in between. const newErrorList = newErrors.projectErrors.find(pe => pe.projectUrl == projectUrl)?.errors?.filter(e => e.code !== 5055) ?? []; - const oldErrorList = oldProjectErrors.errors; + // Obviously, 5055 doesn't indicate a problem with building twice if it occurs during the first build, + // but it's still not interesting to report that it went away (which we would, since we drop it from `newErrorList`). + const oldErrorList = oldProjectErrors.errors.filter(e => e.code !== 5055); console.log(`Error counts for ${projectUrl}: new = ${newErrorList.length}, old = ${oldErrorList.length}`);