From dbf808362d13d54ebea8f944c74c1a11df478eb6 Mon Sep 17 00:00:00 2001 From: Maurice Date: Mon, 30 Nov 2026 14:04:47 +0100 Subject: [PATCH] ci(sonar): analyse the server tests in the server's own TypeScript program The scan ran out of memory since the places work: the analyser keeps every file it parsed until the end, finds only files named tsconfig.json, and server/tsconfig.json leaves out tests/, so the server tests landed in a catch-all program that parsed server/src and shared/src a second time, about 9,400 files and some 2 GB. Naming the tsconfigs, with the server's tsconfig.tests.json in place of tsconfig.json, keeps them in the program that already parsed those files. No file leaves the analysis. --- sonar-project.properties | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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