Repository navigation
Expand file tree
/
Copy pathsonar-project.properties
More file actions
46 lines (39 loc) · 2.44 KB
/
Copy pathsonar-project.properties
File metadata and controls
46 lines (39 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
sonar.projectKey=0bnoxide_AutoGIS
sonar.organization=0bnoxide
# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=AutoGIS
#sonar.projectVersion=1.0
# Production code vs test code. `sonar.sources` defaults to "." — which counts
# every added *test* line as new code needing coverage, and tests are not
# themselves covered by `--cov=autogis`. PR #453 measured 95% coverage on its
# added production lines and Sonar still reported 14.3%, because ~490 of its
# added lines were the regression tests. Declaring the split makes the gate
# measure what it is meant to measure; `tests` stays in `sonar.tests` so it is
# still analyzed for issues, just not held to a coverage threshold.
sonar.sources=autogis
sonar.tests=tests
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8
# Coverage. Windows full-suite and focused Linux POSIX-test reports use
# relative_files=true (pyproject.toml) so the
# paths resolve regardless of the runner's checkout location. Without this the
# "Coverage on New Code" condition sees 0.0% and fails every PR — issue #452.
sonar.python.coverage.reportPaths=coverage.xml,coverage-posix.xml
sonar.python.version=3.11
# Coverage exclusions: exactly the modules that import PySide6 at module load.
# CI installs `.[dev]`, which does not carry PySide6 (it lives in the `gui`
# extra), so every GUI test self-skips via pytest.importorskip and these
# modules report 0% — a new-code threshold the runner is structurally unable
# to meet, which made the gate fail EVERY GUI-only PR by construction (#491,
# hit live on PR #490). They are still analyzed for issues, just not held to
# the coverage gate. Same "measure what the gate is meant to measure"
# rationale as the sonar.sources/sonar.tests split above.
#
# Deliberately per-module, not `autogis/adapters/gui/**`: the rest of the GUI
# adapter is PySide6-free by design — the dict-building/validation/YAML logic
# lives in config_builder.py, the subprocess logic in executor.py/runner.py —
# and those ARE covered in CI, so they stay under the gate. The widgets-only
# modules are the ones that cannot be measured.
# tests/test_sonar_coverage_exclusions.py pins the two lists together, so a
# new widgets module cannot silently reintroduce the false red.
sonar.coverage.exclusions=autogis/adapters/gui/app.py,autogis/adapters/gui/config_builder_dialog.py,autogis/adapters/gui/gw_model_approval_dialog.py,autogis/adapters/gui/settings.py