feat: enforce >90% SonarQube coverage rules and exclusions for Laravel

- Enhance laravel-unit-test skill with layer-by-layer branch coverage rules
- Expand Laravel boilerplate exclusions in sonar-project.properties template
- Update SonarQube guide with Laravel comprehensive exclusions
This commit is contained in:
2026-09-14 10:33:35 +07:00
parent 8f7212ef65
commit 97f3833bf2
3 changed files with 37 additions and 15 deletions
@@ -18,5 +18,5 @@ sonar.php.tests.reportPath=phpunit-report.xml
sonar.coverage.inclusions=app/Services/**,app/Actions/**,app/Http/Controllers/**,app/Http/Requests/**,app/Rules/**,app/Jobs/**,app/Policies/**,app/Models/**,app/Repositories/**,app/Console/Commands/**,app/Listeners/**,app/Notifications/**,app/Mail/**
# Exclusions: Loại trừ boilerplate, migrations, seeders, config để đảm bảo Coverage > 90%
sonar.coverage.exclusions=app/Providers/**,app/Console/Kernel.php,app/Http/Middleware/TrustProxies.php,bootstrap/**,config/**,database/**,tests/**
sonar.coverage.exclusions=app/Providers/**,app/Console/Kernel.php,app/Exceptions/Handler.php,app/Http/Kernel.php,app/Http/Middleware/TrustHosts.php,app/Http/Middleware/TrustProxies.php,app/Http/Middleware/VerifyCsrfToken.php,app/Http/Middleware/EncryptCookies.php,app/Http/Middleware/TrimStrings.php,app/Http/Middleware/PreventRequestsDuringMaintenance.php,bootstrap/**,config/**,database/**,tests/**
sonar.cpd.exclusions=tests/**