Repository navigation
Commit 84ddf07
committed
Travis: Add QA-checks for the WP_CLI_CS ruleset
This adds two checks:
1. Validation of the `WP_CLI_CS` ruleset against the PHPCS ruleset format as defined in the XSD file.
2. A check that the ruleset is formatted consistently, i.e. using tab indents, indented correctly, valid strict XML etc.
Both these checks need the `libxml2-utils` package to be available and both checks only need to be run once as the output will not change based on PHP versions.
As the `libxml2-utils` package is not a package which can be required via Composer, it did not make sense to add these commands as Composer scripts as, in that case, the `xmllint` package may not be available on the machine running the commands.
With that in mind and as these checks will only be needed for this repo and not for the project repos, I've added the necessary changes straight into the `.travis.yml` file.
Alternatively, the two command lines could be extracted to a bash script in the `bin` directory and the script then called directly from the Travis script (bypassing Composer), but that would still leave the environment variable definition and the `addons` directive in the Travis script, so doesn't really do all that much.
Includes minor tweak to the ruleset to make it pass the second check 😉.1 parent b0249f1 commit 84ddf07
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| |||
0 commit comments