ChromatixAU / phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.
https://www.chromatix.com.au
MIT License
1 stars 0 forks source link

Suggested composer lint script does not work properly on Windows #5

Open tdmalone opened 6 years ago

tdmalone commented 6 years ago

The README recommends:

"scripts": {
  "lint": "find . -type d \\( -name '.git' -o -name 'vendor' -o -name 'node_modules' \\) -prune -o -type f -name '*.php' -print | xargs vendor/bin/phpcs"
}

This has issues running on Windows (Linux is fine):

$ composer lint
> find . -type d \( -name '.git' -o -name 'vendor' -o -name 'node_modules' \) -prune -o -type f -name "*.php" -print | xargs vendor/bin/phpcs
Script find . -type d \( -name '.git' -o -name 'vendor' -o -name 'node_modules' \) -prune -o -type f -name "*.php" -print | xargs vendor/bin/php
cs handling the lint event returned with error code 1

However running the entire command directly - outside of Composer - works fine.