Closed limikael closed 4 years ago
That's what I run in the terminal:
phpcs . --ignore=class-tgm-plugin-activation.php --standard=WordPress
And that's how the Twenty Twenty theme runs PHPCS and WPCS.
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
"wptrt/wpthemereview": "^0.2.0"
},
"scripts": {
"checkcs": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 5.6-",
"fixcs": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --runtime-set testVersion 5.6-",
},
# Check the code against the standards as documented in the phpcs.xml.dist file.
- if [[ "$PHPCS" == 1 ]]; then composer checkcs; fi
...as it says... :)