- Status: Accepted
- Date: 2026-11-19
SonarCloud ran in automatic analysis since the project was imported. On 2026-11-19 the master analysis carried four warnings: Python analyzed as compatible with 3.10 to 3.15, test-looking Python files analyzed as production code because sonar.tests was unset, no AWS provider version for the Terraform rules, and a tsconfig.json whose extends could not be resolved.
Facts that shaped the decision, as of 2026-11-19:
- Automatic analysis reads only a short list of keys from
.sonarcloud.properties(sources, tests, inclusions, exclusions, encoding, CPD exclusions and the Python version). It ignoredsonar.issue.ignore.multicriteria, measured when the threeplsql:VarcharUsageCheckfalse positives stayed open after the file landed in pull request #39, and it has no key forsonar.terraform.provider.aws.version. - It never installs dependencies, so the front of the application service, whose
tsconfig.app.json,tsconfig.node.jsonande2e/tsconfig.jsonextend@vue/tsconfigand@tsconfig/node26, is always analyzed without those presets. - It did not index Java at all (
javawas missing fromncloc_language_distribution), so no Java rule ever ran on either backend, and it imports no coverage. - The project uses the built-in Sonar way gate, which includes coverage on new code of at least 80% (applied from 20 new lines). With no coverage data that condition was never evaluated.
- New code is previous version, and no analysis had ever set a version, so new code was everything since 2026-11-08.
- The ruleset requires the
SonarCloud Code Analysischeck on every pull request, Dependabot's included (ADR 0005).
- CI-based analysis in
.github/workflows/sonar.yml, with automatic analysis switched off in the project (Administration, Analysis Method)..sonarcloud.propertiesis gone;sonar-project.propertiesat the root holds every setting, the multicriteria exclusion included. - One SonarCloud project for the whole repository, as before, so the issue history and the required check stay the same.
- Build jobs without secrets (
sonar-java-app,sonar-java-auth,sonar-front-app,sonar-front-auth,sonar-data) run in parallel on every pull request and every push tomaster, with no paths filter, and hand classes, libraries (dependency:copy-dependencies) and coverage reports tosonar-scanas artifacts.sonar-scanis the only job that seesSONAR_TOKEN; it runs no build code, onlynpm ci --ignore-scriptsso the tsconfig presets resolve, and the scanner with full git history, so SCM blame keeps issues on old lines out of new code. - Coverage for every language: JaCoCo XML from both services, lcov from Vitest's v8 provider in both fronts (written with paths from the repository root through
projectRoot), andcoverage.xmlfrom pytest. Only entry points, configuration files and type declarations are excluded from coverage. - Tests as tests:
src/testof both services,e2e/and__tests__/of both fronts anddata/pipeline/testsgo tosonar.testsand are excluded from the sources. - Generated code out: the OpenAPI client in
frontend/vortex-application-service/src/api/generated/is excluded. - Language settings:
sonar.python.version=3.12(therequires-pythonrange) andsonar.terraform.provider.aws.version=6.73(the version locked in every AWS stack). - Version:
sonar.projectVersionfollows the release version, so new code onmasterrestarts at each release. - Token: a personal access token of the owner, valid for one year, stored as
SONAR_TOKENin both the Actions and the Dependabot secrets. Organization-scoped tokens need a paid plan.
- Keep automatic analysis and live with the warnings: the Python version and the tests could be set there, but the Terraform version, the multicriteria exclusion, the tsconfig presets, Java and coverage cannot.
- Run the scan inside the existing per-service workflows: each build job is skipped when its folder did not change, so a single analysis would miss the other languages' data, and one project analyzed by several scans keeps only the last one.
- One SonarCloud project per service: the documented monorepo layout, but it splits the history, and the ruleset would need one required check per project.
- The Maven scanner: it reads the classpath by itself, but it analyzes one Maven project, and the repository has two plus three non-Java modules.
- Secretless analysis (
sonarqube-auth-actionover OIDC): no stored secret, but its behaviour on Dependabot pull requests is not documented, and a required check that never reports blocks every merge.
- The four analysis warnings are gone, and the Java rules run for the first time. One warning is accepted: the PL/SQL Data Dictionary is not configured, so rules S3641, S3921, S3618 and S3651 stay silent; configuring it would mean a JDBC connection from every scan to an Oracle database, and the Oracle scripts are only a local option. Issues they find on lines untouched since the last change count as overall code, not new code.
- The 80% coverage condition now applies to the changed lines of every pull request with 20 or more new lines. The JaCoCo floors in the poms are still the build gate for the whole module.
- Every pull request runs both Maven builds and both front test suites a second time, about ten minutes of runner time that does not delay the per-service checks, which run in parallel.
- Pull requests from forks get no secret, so their scan fails. The token expires after a year and must be renewed in both secret stores before that.
- The version must be bumped in
sonar-project.propertiestogether with the other modules (CLAUDE.md, Governance).
The accepted Data Dictionary warning is gone. Every .sql file was read as PL/SQL (Oracle), but all of them are PostgreSQL (the Flyway migrations of both services and infra/docker/init-auth-db.sql) except infra/oracle/init/01-init-schema.sql, which holds only GRANTs. Read as Oracle they raised only false positives (plsql:VarcharUsageCheck on PostgreSQL VARCHAR, plsql:S1138 on NOT EXISTS) and the warning. sonar.plsql.file.suffixes now names a suffix that no file uses, so the PL/SQL analyzer reads nothing, and the multicriteria exclusion for VarcharUsageCheck is gone with it. The cost: the .sql files get no rule at all. A future Oracle script would need its own suffix in that key, and with it the Data Dictionary question comes back.
- SonarQube Cloud, Automatic analysis: https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/automatic-analysis/
- SonarQube Cloud, GitHub Actions: https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/ci-based-analysis/github-actions-for-sonarcloud/
- SonarQube Cloud, Test coverage parameters: https://docs.sonarsource.com/sonarqube-cloud/enriching/test-coverage/test-coverage-parameters/
- SonarQube Cloud, Quality gates: https://docs.sonarsource.com/sonarqube-cloud/improving/quality-gates/
- SonarSource/sonarqube-scan-action: https://github.com/SonarSource/sonarqube-scan-action