Skip to content

Commit

Permalink
Merge pull request #7975 from Sesquipedalian/lint_only_changed_files
Browse files Browse the repository at this point in the history
Runs PHP-CS-Fixer lint check on changed files only
  • Loading branch information
Sesquipedalian authored Dec 26, 2023
2 parents ff3183e + 548b0a4 commit a2a88de
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",
"lint-fix": "php-cs-fixer fix -v"
"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 a2a88de

Please sign in to comment.