Commit graph

14 commits

Author SHA1 Message Date
jrfnl
dd7a1604e6 🔧 PHPCS: clean up the file paths PHPCS shows
This uses a new feature which is available since PHPCS 3.x.
2018-02-27 14:34:50 +01:00
jrfnl
c453749f7a 🔧 PHPCS: don't ignore warnings, don't list scanned files
The `-n` flag will ignore warnings completely, while often it is useful to see them and to fix them.

Using `--runtime-set ignore_warnings_on_exit 1` in the Travis script instead, warnings will be shown, both when a developer runs PHPCS on their own machine, as well as in Travis, but warnings will not cause a failed Travis build.

The `-v` flag will list each file being scanned. This is intended for debugging purposes and not needed for normal use.
2018-02-27 14:34:50 +01:00
jrfnl
92d8673e4a 🔧 PHPCS: add section headings
This is intended to make it clearer for a newcomer to PHPCS to understand how the ruleset is build up and what each part of the ruleset means.
2018-02-27 14:34:50 +01:00
jrfnl
94767ab051 🔧 PHPCS: tidy up config file
Comply with strict XML standard.
2018-02-27 14:34:50 +01:00
Truong Giang
6e75903248 Update PHPCS ruleset to check coding standard for CSS and SCSS files 2017-07-24 08:23:45 +07:00
Truong Giang
6e5adc24bb Trim white space in a blank line 2017-07-01 10:22:22 +07:00
jrfnl
e475309cd5 WPCS: Verify that no deprecated or removed WP functions are being used.
Ref: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#minimum-wp-version-to-check-for-usage-of-deprecated-functions-and-function-parameters
2017-06-17 17:08:58 +02:00
David A. Kennedy
1f9ad8893d Merge pull request #1122 from jrfnl/feature/wpcs-allow-theme-specific-filenames
WPCS: Allow for typical theme specific file names based on the theme hierarchy
2017-06-17 16:27:58 +02:00
jrfnl
755619e74d WPCS: Allow for typical theme specific file names based on the theme hierarchy.
Ref: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#themes-allow-filename-exceptions
2017-06-16 00:53:50 +02:00
jrfnl
b560425ff1 PHPCS ruleset: add link to the PHPCompatibility repo.
At the top of the ruleset there were links to the PHPCS and the WPCS repo, but not to the PHPCompatibility repo which is also being used.
2017-06-16 00:48:12 +02:00
jrfnl
bc9d5f742e Fix link to WPCS in the PHPCS ruleset.
The link was pointing to the `WordPress-Core` ruleset, while `_s` uses the `WordPress` ruleset which encompasses more than just the core rules.

Pointing to the repo + the wiki seems more appropriate to me.
2017-06-16 00:48:11 +02:00
David A. Kennedy
67d6d59235 Merge branch 'feature/rename-phpcs-ruleset' 2017-06-16 00:39:39 +02:00
jrfnl
b78d053772 PHPCS: Move the recommended command line arguments into the custom ruleset. 2017-06-12 00:21:34 +02:00
jrfnl
0d353e1c0c Rename the PHPCS ruleset.
If the file is called `phpcs.xml` or `phpcs.xml.dist`, it is automatically picked up by PHPCS.

A `phpcs.xml` is given preference over a `phpcs.xml.dist` file. So renaming the file to `phpcs.xml.dist` allows for people to use the file provided by `_s` if they choose not to add their own, but also leaves people the freedom to easily overrule it.
2017-06-12 00:11:53 +02:00
Renamed from codesniffer.ruleset.xml (Browse further)