Skip to content

Commit

Permalink
Don't run PHP-CS-Fixer lint check at all if no PHP files have changed
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Stovell <[email protected]>
  • Loading branch information
Sesquipedalian committed Dec 26, 2023
1 parent e06d6bf commit 548b0a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"friendsofphp/php-cs-fixer": "^3.40"
},
"scripts": {
"lint": "php-cs-fixer check --diff --config .php-cs-fixer.dist.php $(git diff --name-only \"*.php\")",
"lint-fix": "php-cs-fixer fix -v --config .php-cs-fixer.dist.php $(git diff --name-only \"*.php\")"
"lint": "[ -z \"$(git diff --name-only \"*.php\")\" ] || php-cs-fixer check --diff --config .php-cs-fixer.dist.php $(git diff --name-only \"*.php\")",
"lint-fix": "[ -z \"$(git diff --name-only \"*.php\")\" ] || php-cs-fixer fix -v --config .php-cs-fixer.dist.php $(git diff --name-only \"*.php\")"
},
"config": {
"platform": {
Expand Down

0 comments on commit 548b0a4

Please sign in to comment.