Commit bddc9d1
feat(ci): SonarCloud integration for SAST and technical debt tracking (#376)
* feat(ci): add SonarCloud integration for SAST and technical debt tracking
Adds comprehensive static analysis configuration:
- sonar-project.properties: Coverage thresholds (85%), quality gate configuration
- .github/workflows/sonarcloud.yml: Runs on push/PR with quality gate checks
- README.adoc: SonarCloud quality gate and coverage badges
Configuration includes:
- Go coverage reporting (coverage.out from go test)
- Coverage thresholds: >80% code coverage, <5% duplications
- Quality gate: A-level maintainability, security, and reliability
- PR integration: Comments with analysis summary
- Excludes: test files, vendor directory, integration tests
Manual setup required (one-time):
1. Create SonarCloud account at https://sonarcloud.io
2. Link GitHub repo: docToolchain/Bausteinsicht
3. Generate SONAR_TOKEN in project settings
4. Add SONAR_TOKEN to GitHub Secrets
5. Set GitHub branch protection: require quality gate
Fixes #357
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* fix(ci): update codecov action to v4
Replace specific commit SHA with stable v4 tag to avoid action resolution errors.
Optional step with fail_ci_if_error: false won't block pipeline.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* fix(sonar): remove wildcard patterns from sonar.properties
- Remove sonar.tests with wildcard pattern (not supported by SonarCloud)
- Simplify sonar.exclusions to directory names only (vendor, .git, .devcontainer)
- SonarCloud auto-detects test files (*_test.go) without explicit config
- This fixes SonarCloud analysis error: 'Wildcards ** and * are not supported'
Fixes: sonarcloud.yml analysis failure in PR #376
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>1 parent 635daf9 commit bddc9d1
3 files changed
Lines changed: 114 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments