Refactor PHPStan setup in Makefile: streamline configuration and remove redundant checks

This commit is contained in:
Vincent 2025-09-30 21:54:55 -04:00
parent 41cd7a4fd8
commit d6bf410add

View file

@ -86,6 +86,8 @@ test-watch:
make test-unit; \
done
# PFStan configuration
# Code quality
lint:
@echo "Running PHPStan static analysis..."
@ -93,26 +95,23 @@ lint:
phpstan-setup:
@echo "Setting up PHPStan configuration..."
@if [ ! -f phpstan.neon ]; then \
cat > phpstan.neon << EOF
cat > phpstan.neon << EOF
parameters:
level: 8
paths:
- models
- controllers
- services
- utils
- includes
excludes_analyse:
- vendor/
- tests/
- assets/
- static/
- migrations/
ignoreErrors:
- '#Function config not found#' # For Config::get calls
EOF
fi
level: 8
paths:
- models
- controllers
- services
- utils
- includes
excludes_analyse:
- vendor/
- tests/
- assets/
- static/
- migrations/
ignoreErrors:
- '#Function config not found#' # For Config::get calls
check: test lint
@ -136,7 +135,7 @@ clean:
rm -rf tests/results/
rm -rf logs/
rm -f phpunit.xml.bak
find . -name "*.log" -not -name ".git*" -delete
find . -name "*.log" -not -name ".git*" -deleteW
find . -name "*~" -delete
find . -name "*.tmp" -delete