Skip to content

Commit

Permalink
add note about --ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence committed Feb 17, 2023
1 parent cef6a73 commit 9e732a7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

PHPCS rulesets for WordPress projects on Pantheon.

This is a work-in-progress...

## Setup
The PHPCS ruleset can be installed via Composer:

Expand All @@ -20,6 +18,12 @@ vendor/bin/phpcs -s --standard=Pantheon-WP .

We recommend using the `-s` flag so that PHPCS will report the specific rule that was violated. This makes it easier to add exclusions or research possible solutions.

If you have a tests directory that you want to exclude from the sniffs, you can do so by adding the `--ignore` flag:

```
vendor/bin/phpcs -s --ignore=tests/* --standard=Pantheon-WP .
```

## Extending

If you want to customize the defaults or add additional rules, you can create your own standard file (e.g. `phpcs.ruleset.xml`):
Expand Down

0 comments on commit 9e732a7

Please sign in to comment.