Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(lint): fix PHP lint to ignore path rather than forcing it #268

Merged
merged 3 commits into from
Mar 21, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,21 @@ docker-lint-fix: docker-php-cs-fixer-fix
# target: php-cs-fixer (or docker-php-cs-fixer) - Lint the code and expose errors
.PHONY: php-cs-fixer docker-php-cs-fixer
php-cs-fixer: tools/vendor
@php-cs-fixer fix --dry-run --diff --using-cache=no;
@php-cs-fixer fix --dry-run --diff --using-cache=no --config=.php-cs-fixer.dist.php;
docker-php-cs-fixer: tools/vendor
@$(call in_docker,make,lint)

# target: php-cs-fixer-fix (or docker-php-cs-fixer-fix) - Lint the code and fix it
.PHONY: php-cs-fixer-fix docker-php-cs-fixer-fix
php-cs-fixer-fix: tools/vendor
@php-cs-fixer fix --using-cache=no;
@php-cs-fixer fix --using-cache=no --config=.php-cs-fixer.dist.php
docker-php-cs-fixer-fix: tools/vendor
@$(call in_docker,make,lint-fix)

# target: php-lint (or docker-php-lint) - Lint the code with the php linter
.PHONY: php-lint docker-php-lint
php-lint:
@find . -type f -name '*.php' -not -path 'vendor' -and -path 'tools/vendor' -print0 | xargs -0 -n1 php -l -n | (! grep -v "No syntax errors" );
@find . -type f -name '*.php' -not -path 'vendor' -and -not -path 'tools/vendor' -print0 | xargs -0 -n1 php -l -n | (! grep -v "No syntax errors" );
@echo "php $(shell php -r 'echo PHP_VERSION;') lint passed";
docker-php-lint:
@$(call in_docker,make,php-lint)
Expand Down
Loading