Skip to content

Commit 5480143

Browse files
committed
fix how reporter is read
1 parent 0f581e2 commit 5480143

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/ecosystem-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ jobs:
197197
if: ${{ ! cancelled() }}
198198
working-directory: repository/${{ matrix.working-directory }}
199199
run: >
200-
biome check --reporter=json ${{ matrix.arguments || '.' }} 2>&1
201-
| tee "$GITHUB_WORKSPACE/biome-report.json";
200+
biome check --reporter=json --max-diagnostics=0 ${{ matrix.arguments || '.' }} 2>/dev/null
201+
| tee "$GITHUB_WORKSPACE/biome-report.json" || true;
202202
203203
- name: Upload Biome report
204204
# Don't save the report if the biome binary was not built on main.

scripts/aggregate-outcomes.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,19 @@ function readReport(reportsDir, projectId) {
263263
);
264264

265265
if (fs.existsSync(reportPath)) {
266-
const content = fs.readFileSync(reportPath, "utf-8");
267-
return JSON.parse(content);
266+
try {
267+
const content = fs.readFileSync(reportPath, "utf-8");
268+
return JSON.parse(content);
269+
} catch (error) {
270+
console.error(
271+
`Warning: Failed to parse JSON report for ${projectId}: ${error.message}`,
272+
);
273+
console.error(`Report path: ${reportPath}`);
274+
console.error(
275+
`Content preview: ${content.substring(0, 200)}...`,
276+
);
277+
return null;
278+
}
268279
}
269280

270281
return null;

0 commit comments

Comments
 (0)