fix: run all tests in CI and remap LCOV paths for Sonar
sonar / sonar (push) Skipped
sonar / sonar (pull_request) Canceled after 7m29s
sonar / sonar (push) Skipped
sonar / sonar (pull_request) Canceled after 7m29s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
const fs = require("node:fs");
|
||||
const path = require("node:path");
|
||||
|
||||
const file = path.join("coverage", "lcov.info");
|
||||
const remapped = fs.readFileSync(file, "utf8").replace(/^SF:(.+)$/gm, (_, p) => {
|
||||
const norm = String(p).replaceAll("\\", "/");
|
||||
const match = /(?:^|\/)dist\/(.+)\.js$/.exec(norm);
|
||||
return match ? `SF:src/${match[1]}.ts` : `SF:${norm}`;
|
||||
});
|
||||
fs.writeFileSync(file, remapped);
|
||||
Reference in New Issue
Block a user