]> Piment Noir Git Repositories - poolifier.git/commitdiff
ci(sonar): analyze TypeScript sources (#3423)
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 25 Nov 2026 21:45:31 +0000 (22:45 +0100)
committerGitHub <noreply@github.com>
Wed, 25 Nov 2026 21:45:31 +0000 (22:45 +0100)
Remap V8 coverage to the TypeScript sources so Sonar does not analyze
generated declarations or count the unmapped Rollup entry point.

package.json
sonar-project.properties
vitest.config.ts

index 2bf14495010e4033b2291346183039e586934857..5699dded774d7d090ac279b658ee958361582fa3 100644 (file)
@@ -29,7 +29,7 @@
     "benchmark:tinybench:debug": "pnpm build && node --enable-source-maps --inspect benchmarks/internal/bench.mjs -t tinybench",
     "test": "pnpm build --environment SOURCEMAP:false && vitest run",
     "test:debug": "pnpm build && vitest --inspect-brk --no-file-parallelism",
-    "test:coverage": "pnpm build --environment SOURCEMAP:false && vitest run --coverage",
+    "test:coverage": "pnpm build && vitest run --coverage",
     "format": "biome format . --write; eslint . --cache --fix",
     "lint": "eslint . --cache",
     "lint:fix": "eslint . --cache --fix",
index d2af44cd5a008dc7584fdd7aed00078c02bc5cb5..19e59f640755dddfbc5c70472b3bf85e5fd85354 100644 (file)
@@ -1,14 +1,12 @@
 sonar.projectKey=poolifier_poolifier
 sonar.organization=poolifier
-sonar.javascript.exclusions=lib/**/*.cjs
 sonar.javascript.lcov.reportPaths=coverage/lcov.info
 sonar.projectName=poolifier
 # x-release-please-start-version
 sonar.projectVersion=6.1.1
 # x-release-please-end
 sonar.host.url=https://sonarcloud.io
-#sonar.sources=src
-sonar.sources=lib
+sonar.sources=src
 sonar.tests=tests
 #sonar.login=TOKEN # To use for local troubleshooting
 sonar.verbose=false
index 13c9dc5015ab17732d1588897a50037339cb046f..91c02911c9beaab117feb25e17e218f6240bb3a0 100644 (file)
@@ -3,6 +3,8 @@ import { defineConfig } from 'vitest/config'
 export default defineConfig({
   test: {
     coverage: {
+      exclude: ['lib/index.mjs'],
+      excludeAfterRemap: true,
       provider: 'v8',
       reporter: ['text', 'html', 'lcov'],
       thresholds: {