Files
poli0981andClaude Opus 5.5 40b17e620d ci(sonar): analyse in GitHub Actions with test coverage (#157)
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>
2026-10-22 20:30:20 +07:00

33 lines
1.0 KiB
TOML

# Project tooling configuration.
#
# The repo has no Python build system — the scraper pipeline runs the
# scripts/ modules directly. Lint + dead-code tools configured here:
# ruff check scripts/ — style, unused imports/variables
# vulture — dead code (unused functions, classes, attributes)
[tool.ruff]
line-length = 100
target-version = "py315"
[tool.ruff.lint]
select = ["E", "F", "I", "W", "UP", "B", "BLE", "S113"]
[tool.vulture]
paths = ["scripts", "webapp/scripts", "tests"]
min_confidence = 60
# Autouse pytest fixtures are used by pytest itself, not called by name.
ignore_names = ["no_network"]
[tool.pytest.ini_options]
testpaths = ["tests"]
# tests/conftest.py blocks all network access; parser tests use saved fixtures.
addopts = "-q"
# `pytest --cov --cov-report=xml` writes coverage.xml for SonarQube Cloud
# (.github/workflows/sonarcloud.yml); plain `pytest` measures nothing.
# Relative paths, so the scan job resolves them in its own checkout.
[tool.coverage.run]
source = ["scripts"]
relative_files = true
branch = true