Skip to content

Commit a0b5780

Browse files
authored
Dont count duplicated errors in case-insensitive duped files in rwc (#24383)
1 parent 16af96b commit a0b5780

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/harness/harness.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,14 @@ namespace Harness {
14691469

14701470
// Verify we didn't miss any errors in this file
14711471
assert.equal(markedErrorCount, fileErrors.length, "count of errors in " + inputFile.unitName);
1472+
const isDupe = dupeCase.has(sanitizeTestFilePath(inputFile.unitName));
14721473
yield [checkDuplicatedFileName(inputFile.unitName, dupeCase), outputLines, errorsReported];
1474+
if (isDupe && !(options && options.caseSensitive)) {
1475+
// Case-duplicated files on a case-insensitive build will have errors reported in both the dupe and the original
1476+
// thanks to the canse-insensitive path comparison on the error file path - We only want to count those errors once
1477+
// for the assert below, so we subtract them here.
1478+
totalErrorsReportedInNonLibraryFiles -= errorsReported;
1479+
}
14731480
outputLines = "";
14741481
errorsReported = 0;
14751482
}

0 commit comments

Comments
 (0)