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