diff --git a/sonar-project.properties b/sonar-project.properties index 9e9e32ffb..0e82630f3 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -99,6 +99,21 @@ sonar.cpd.exclusions=shared/src/i18n/**,server/src/db/kysely/**,shared/src/book/ # The hosted runner has 16 GB. sonar.javascript.node.maxspace=8192 +# The analyser builds one TypeScript program per tsconfig and keeps every file +# it parsed until the end of the scan. On its own it only finds files named +# tsconfig.json, and server/tsconfig.json leaves out tests/, so the server tests +# landed in a catch-all program with options merged from every package, which +# parsed all of server/src and shared/src a second time (about 9,400 files). +# tsconfig.tests.json is the server's own program over src and tests, so the +# tests share the files the server program already parsed. The order is the +# one the lookup used (alphabetical), so every other file stays in the program +# that analysed it before; the eslint-rules fixture project claimed no file. +sonar.typescript.tsconfigPaths=\ + client/tsconfig.json,\ + plugin-sdk/tsconfig.json,\ + server/tsconfig.tests.json,\ + shared/tsconfig.json + # Only categorical, path-wide suppressions live here — cases where the rule can # never meaningfully apply to anything in the path. Instance-specific findings