feat: enforce >90% SonarQube coverage standards for CakePHP and Laravel
- Add sonar-project.properties templates for CakePHP and Laravel - Update install.sh to automatically provision SonarQube config - Enhance cakephp-unit-test skill with exhaustive branch coverage rules - Update SonarQube guide with CakePHP specific rules and exclusion patterns - Enhance TableTest template with buildRules and validation failure cases
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# ==============================================================================
|
||||
# SonarQube Configuration for Laravel Unit Testing (> 90% Coverage Target)
|
||||
# ==============================================================================
|
||||
|
||||
sonar.projectKey=laravel-app
|
||||
sonar.projectName=Laravel Application
|
||||
sonar.projectVersion=1.0
|
||||
|
||||
# Đường dẫn nguồn và test
|
||||
sonar.sources=app
|
||||
sonar.tests=tests
|
||||
|
||||
# Báo cáo Code Coverage sinh ra từ PHPUnit / Artisan test
|
||||
sonar.php.coverage.reportPaths=coverage.xml
|
||||
sonar.php.tests.reportPath=phpunit-report.xml
|
||||
|
||||
# Inclusions: Tập trung đo độ phủ các tầng nghiệp vụ cốt lõi
|
||||
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.cpd.exclusions=tests/**
|
||||
Reference in New Issue
Block a user