[wp-trac] [WordPress Trac] #47853: Minor update to composer lint scripts
WordPress Trac
noreply at wordpress.org
Thu Aug 8 16:49:13 UTC 2019
#47853: Minor update to composer lint scripts
-------------------------+-------------------------------
Reporter: dingo_d | Owner: pento
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: coding-standards
-------------------------+-------------------------------
Comment (by jrf):
@dingo_d Bit of feedback:
1. `@php ./vendor/bin/phpcs` and the likes won't work on Windows. You need
to reference the actual PHP file, not the bash script for it to work
cross-platform, i.e. `@php ./vendor/squizlabs/php_codesniffer/bin/phpcs`.
See: https://github.com/composer/composer/issues/7645
2. `--report-summary --report-source` can be shortened to
`--report=summary,source` (PHPCS 3.x feature)
Regarding removing `--standard=phpcs.xml.dist` 👍👍
PHPCS will automatically pick up on a `phpcs.xml.dist` file when it's
available and not hard-coding it allows for devs to use the scripts and
still overrule the config with a local `phpcs.xml` file containing extra
rules (like [https://github.com/PHPCompatibility/PHPCompatibilityWP
PHPCompatibilityWP] for instance).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47853#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list