Skip to content

Commit 6721366

Browse files
nanotaboadaclaude
andcommitted
chore(sonar): add .sonarcloud.properties (#554)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 955e6f6 commit 6721366

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

.sonarcloud.properties

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# =============================================================================
2+
# SonarCloud Automatic Analysis configuration
3+
# https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/automatic-analysis/
4+
#
5+
# SonarCloud's automatic analysis (GitHub App, no CI workflow) reads THIS file.
6+
# Wildcard patterns are NOT supported here, so all exclusion paths must be
7+
# listed explicitly.
8+
# =============================================================================
9+
10+
sonar.projectKey=nanotaboada_python-samples-fastapi-restful
11+
sonar.organization=nanotaboada
12+
sonar.projectName=python-samples-fastapi-restful
13+
14+
sonar.sources=databases,models,routes,schemas,services,tools,main.py
15+
sonar.tests=tests
16+
17+
# =============================================================================
18+
# Global exclusions
19+
# Standalone seed scripts excluded from analysis.
20+
# =============================================================================
21+
22+
sonar.exclusions=\
23+
tools/seed_001_starting_eleven.py,\
24+
tools/seed_002_substitutes.py
25+
26+
# =============================================================================
27+
# Coverage exclusions
28+
# Mirrors codecov.yml ignore list — focus on routes/, services/
29+
# =============================================================================
30+
31+
sonar.coverage.exclusions=\
32+
databases/__init__.py,\
33+
databases/player_database.py,\
34+
models/__init__.py,\
35+
models/player_model.py,\
36+
schemas/__init__.py,\
37+
schemas/player_schema.py,\
38+
tools/seed_001_starting_eleven.py,\
39+
tools/seed_002_substitutes.py,\
40+
tests/__init__.py,\
41+
tests/conftest.py,\
42+
tests/player_stub.py,\
43+
tests/test_main.py,\
44+
main.py
45+
46+
# =============================================================================
47+
# Duplicate code (CPD) exclusions
48+
# Automatic analysis does not support wildcard patterns, so each file is
49+
# listed explicitly.
50+
#
51+
# player_stub.py — test fixture; parallel field assignments by design.
52+
# seed scripts — sequential insert calls are intentionally repetitive.
53+
# =============================================================================
54+
55+
sonar.cpd.exclusions=\
56+
tests/player_stub.py,\
57+
tools/seed_001_starting_eleven.py,\
58+
tools/seed_002_substitutes.py

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ This project uses famous football coaches as release codenames, following an A-Z
4444

4545
### Added
4646

47+
- `.sonarcloud.properties`: SonarCloud Automatic Analysis configuration —
48+
sources, tests, coverage exclusions aligned with `codecov.yml` (#554)
49+
- `.dockerignore`: added `.claude/`, `CLAUDE.md`, `.coderabbit.yaml`,
50+
`.sonarcloud.properties`, `CHANGELOG.md`, `README.md` (#554)
4751
- CD workflow now verifies tag commit is reachable from `master` before
4852
proceeding with build and publish steps (#549)
4953

0 commit comments

Comments
 (0)