SonarQube Cloud analyses in GitHub Actions instead of Automatic Analysis, with test coverage (sonarcloud.yml): token (skips Dependabot and fork PRs, which get no SONAR_TOKEN) → coverage (pytest-cov and Vitest v8, no secrets) → scan (sonarqube-scan-action v8.3.0, full history, sonar.projectVersion from webapp/package.json). sonar-project.properties replaces .sonarcloud.properties: tests marked as tests, coverage exclusions for code without unit tests by design, Python 3.14 (the analyzer has no 3.15 yet), binary images and the SQLite migrations (claimed by the PL/SQL analyzer, which only warned) left out. Adds pytest-cov / coverage (dev lock recompiled on Python 3.14) and @vitest/coverage-v8 (Dependabot group with vitest). Docs: CLAUDE.md gotcha 41, THIRD_PARTY, dev_env, CONTRIBUTING (EN + VI). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
2.3 KiB
Properties
46 lines
2.3 KiB
Properties
# SonarQube Cloud, CI-based analysis: .github/workflows/sonarcloud.yml
|
|
# (https://sonarcloud.io/project/overview?id=poli0981_free-games-itchio-list).
|
|
# Automatic Analysis is switched off on sonarcloud.io: the two can't run together.
|
|
# Mark a false positive on the issue itself (CLAUDE.md, gotcha 41).
|
|
sonar.organization=poli0981
|
|
sonar.projectKey=poli0981_free-games-itchio-list
|
|
sonar.projectName=free-games-itchio-list
|
|
sonar.sourceEncoding=UTF-8
|
|
# The project runs on 3.15 (.github/python-version), but SonarQube Cloud's Python
|
|
# analyzer stops at 3.14 ("No explicit support for version 3.15", then it falls
|
|
# back to 3.14). Raise this once it supports 3.15.
|
|
sonar.python.version=3.14
|
|
|
|
# The whole repository, as Automatic Analysis read it, with the tests as tests.
|
|
sonar.sources=.
|
|
# The tests (below); the binary images, which, indexed as text, only made the
|
|
# scanner warn about their encoding; and the D1 migrations, SQLite that the
|
|
# Oracle PL/SQL analyzer claims, only to warn that it has no data dictionary.
|
|
sonar.exclusions=tests/**,webapp/**/*.test.*,webapp/worker/test/**,**/*.png,**/*.ico,**/*.icns,**/*.webp,**/*.sql
|
|
sonar.tests=.
|
|
sonar.test.inclusions=tests/**,webapp/**/*.test.*,webapp/worker/test/**
|
|
# itch.io pages saved as served, for the scraper tests: their markup is
|
|
# itch.io's (tables without <th>, tabindex on divs, …), and editing it would
|
|
# make the tests check something itch.io never sends.
|
|
sonar.test.exclusions=tests/fixtures/**
|
|
|
|
# Written by the workflow's coverage job, with paths from the repository root:
|
|
# `pytest --cov --cov-report=xml` (Cobertura) and `npm run test:coverage` (lcov).
|
|
sonar.python.coverage.reportPaths=coverage.xml
|
|
sonar.javascript.lcov.reportPaths=webapp/coverage/lcov.info
|
|
# No unit tests by design — the React UI (components, routes, hooks, stores),
|
|
# the i18n message catalogs, configs, maintainer tools and the Tauri shell — so
|
|
# they don't count towards coverage (the "Sonar way" quality gate wants 80 % on
|
|
# new code). Keep this list in step with what the tests can reach.
|
|
sonar.coverage.exclusions=\
|
|
**/*.tsx,\
|
|
webapp/src/components/**,\
|
|
webapp/src/hooks/**,\
|
|
webapp/src/lib/use-*.ts,\
|
|
webapp/src/stores/**,\
|
|
webapp/src/lib/i18n/**,\
|
|
webapp/*.config.*,\
|
|
webapp/scripts/gen_assets.py,\
|
|
webapp/scripts/i18n-edit.mjs,\
|
|
webapp/src-tauri/**
|