Skip to content

Implement CS checking based on the WP_CLI_CS ruleset#50

Merged
schlessera merged 3 commits intowp-cli:masterfrom
jrfnl:feature/use-phpcs
Apr 19, 2019
Merged

Implement CS checking based on the WP_CLI_CS ruleset#50
schlessera merged 3 commits intowp-cli:masterfrom
jrfnl:feature/use-phpcs

Conversation

@jrfnl
Copy link
Copy Markdown
Contributor

@jrfnl jrfnl commented Apr 17, 2019

This basically adds a PHPCS ruleset using the new WPCliCSstandard.

Please see the individual commits for more detail.

The build for this PR won't be able to pass until wp-cli-tests 2.1 has been released, upon which time, the build can just be restarted and should be green ;-)

Fixes #51

Related wp-cli/wp-cli#5179

@jrfnl jrfnl requested a review from a team as a code owner April 17, 2019 15:36
@jrfnl jrfnl force-pushed the feature/use-phpcs branch from 91e5453 to 92d7e6f Compare April 17, 2019 16:36
jrfnl added 3 commits April 19, 2019 15:53
... as that version contains the new WPCliCS PHPCS standard.
* `.distignore`: no need to distribute the phpcs/phpunit config files.
* `.gitignore`: Allow devs to overwrite config files for PHPUnit and PHPCS
    - The `.dist` files should be committed. However, for their personal use, devs can overrule those files with versions without `.dist`.
        Those personal versions should never be committed.

As a side-note: for PHPCS, having a personal version while still using the original `.dist` file is made very easy, as you can just import the `.dist` file as a starting point, like so:
```xml
<?xml version="1.0"?>
<ruleset name="WP-CLI">
    <rule ref="./phpcs.xml.dist"/>
</ruleset>
```
The file is completely documented in-line.
@jrfnl jrfnl force-pushed the feature/use-phpcs branch from 92d7e6f to aaf9456 Compare April 19, 2019 13:53
@schlessera schlessera changed the title Implement CS checking based on the WPCliCS ruleset Implement CS checking based on the WP_CLI_CS ruleset Apr 19, 2019
@schlessera schlessera added the scope:testing Related to testing label Apr 19, 2019
@schlessera schlessera added this to the 2.0.2 milestone Apr 19, 2019
@schlessera schlessera merged commit e28a7f5 into wp-cli:master Apr 19, 2019
@jrfnl jrfnl deleted the feature/use-phpcs branch April 20, 2019 16:28
danielbachhuber pushed a commit that referenced this pull request Nov 18, 2022
Implement CS checking based on the `WP_CLI_CS` ruleset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt and enforce new WP_CLI_CS standard

2 participants