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:
2026-09-14 10:31:56 +07:00
parent 7425b263d5
commit 8f7212ef65
6 changed files with 201 additions and 35 deletions
+10
View File
@@ -297,6 +297,16 @@ if [ -d "$TARGET_DIR/.git" ]; then
fi
fi
# F. Tạo file cấu hình SonarQube chuẩn (sonar-project.properties) nếu chưa có
if [ ! -f "$TARGET_DIR/sonar-project.properties" ]; then
if [ "$FRAMEWORK" = "cakephp" ]; then
cp "$PACKAGE_ROOT/templates/cakephp/configs/sonar-project.properties.template" "$TARGET_DIR/sonar-project.properties"
else
cp "$PACKAGE_ROOT/templates/configs/sonar-project.properties.template" "$TARGET_DIR/sonar-project.properties"
fi
echo -e " ${GREEN}✓${NC} Đã tạo cấu hình SonarQube (sonar-project.properties) nhắm mục tiêu Coverage > 90%"
fi
echo -e "\n${GREEN}${BOLD}🎉 CÀI ĐẶT HOÀN TẤT THÀNH CÔNG VÀO SOURCE CODE!${NC}"
echo -e "\n${YELLOW}${BOLD}BÂY GIỜ BẠN CÓ THỂ VIẾT UNIT TEST NGAY:${NC}"
echo -e "1. Mở Claude Code tại source code này:"