Refactor PHPStan setup in Makefile: streamline configuration and remove redundant checks
This commit is contained in:
parent
41cd7a4fd8
commit
d6bf410add
1 changed files with 19 additions and 20 deletions
39
Makefile
39
Makefile
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue