sonar.projectKey=acme:web-apisonar.projectName=ACME Web APIsonar.projectVersion=2.4.0sonar.sources=srcsonar.tests=testssonar.exclusions=**/generated/**,**/node_modules/**sonar.coverage.exclusions=**/*.test.ts,**/migrations/**sonar.javascript.lcov.reportPaths=coverage/lcov.infosonar.python.coverage.reportPaths=coverage.xmlsonar.qualitygate.wait=true
GitHub Actions
# .github/workflows/sonar.ymlname:SonarQubeon:push:{branches:[main] }pull_request:{types:[opened, synchronize, reopened] }jobs:sonar:runs-on:ubuntu-lateststeps:- uses:actions/checkout@v4with:{fetch-depth:0}# full history for blame- uses:actions/setup-node@v4with:{node-version:20}- run:npm ci && npm test -- --coverage- uses:SonarSource/sonarqube-scan-action@v3env:SONAR_TOKEN:${{ secrets.SONAR_TOKEN }}SONAR_HOST_URL:${{ secrets.SONAR_HOST_URL }}
언제: 매 issue triage summary, 매 false-positive review, 매 custom rule draft (Sonar Way deviation), 매 SonarLint + Cursor inline-fix.
언제 X: 매 deterministic rule eval (use scanner), 매 production gate decision (human approve).
❌ 안티패턴
All-code strict: 매 legacy 매 100k issue 의 overwhelm. 매 "Clean as You Code" 의 use.
Coverage-only gate: 매 cov 80% 매 logic untested. 매 mutation testing 의 add.
Ignore hotspots: 매 Security Hotspot 매 review 매 skip. 매 actual vuln 매 hidden.
No blame/SCM: 매 issue ownership 매 unknown. 매 SCM integration 매 must.
Self-host no upgrade: 매 LTA 매 missed → 매 stale rules + CVE on Sonar itself.