Skip to content

Commit afa6037

Browse files
jpnurmiclaude
andauthored
fix: add coverage.cobertura.xml to default discovery patterns (#76)
.NET's XPlat Code Coverage (coverlet) outputs coverage.cobertura.xml which was not matched by the existing default patterns. The output filename is not configurable (coverlet-coverage/coverlet#1276). Refs: - https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-code-coverage - coverlet-coverage/coverlet#1276 Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 6e1445c commit afa6037

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

dist/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232608,6 +232608,7 @@ async function findCoverageFiles(config) {
232608232608
const defaultPatterns = [
232609232609
"**/clover.xml",
232610232610
"**/cobertura.xml",
232611+
"**/coverage.cobertura.xml",
232611232612
"**/coverage.xml",
232612232613
"**/jacoco.xml",
232613232614
"**/lcov.info",

src/__tests__/parser-factory.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ github.com/user/project/file.go:1.1,3.2 1 1
128128
expect(
129129
CoverageParserFactory.detectFormatFromPath("cobertura-coverage.xml")
130130
).toBe("cobertura");
131+
expect(
132+
CoverageParserFactory.detectFormatFromPath("coverage.cobertura.xml")
133+
).toBe("cobertura");
131134
});
132135

133136
it("should detect JaCoCo from path", () => {

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ async function findCoverageFiles(config: CoverageConfig): Promise<string[]> {
617617
const defaultPatterns = [
618618
"**/clover.xml",
619619
"**/cobertura.xml",
620+
"**/coverage.cobertura.xml",
620621
"**/coverage.xml",
621622
"**/jacoco.xml",
622623
"**/lcov.info",

0 commit comments

Comments
 (0)