Commit Graph

14 Commits

Author SHA1 Message Date
Alex Shiels 722d0439f0 Coding Standards: exclude sodium_compat library.
Props dd32.
See #45806.


git-svn-id: https://develop.svn.wordpress.org/trunk@44955 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 05:55:05 +00:00
Gary Pendergast 992184cf73 Coding Standards: Upgrade WPCS to 1.2.1.
This upgrade fixes quite a few false positives, as well as auto-fixing some indenting issues.

Fixes #45956.



git-svn-id: https://develop.svn.wordpress.org/trunk@44574 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 06:40:16 +00:00
Gary Pendergast a139c8cbf7 Coding Standards: Fix and whitelist variable names.
From the `WordPress.NamingConventions.ValidVariableName` sniff, this commit fixes/whitelists all `NotSnakeCaseMemberVar`, `MemberNotSnakeCase`, and `StringNotSnakeCase` violations. It also fixes a handful of the `NotSnakeCase` violations.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44573 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 06:05:55 +00:00
Gary Pendergast c1d4ff496c Coding Standards: Exclude some external files.
- `class-wp-block-parser.php` and `wp-includes/blocks/*` are imported from the Gutenberg plugin.
- `speed-trap-listener.php` is a third party library.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44571 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 04:00:42 +00:00
Gary Pendergast d0f00b58e2 Coding Standards: Add exceptions for `WordPress.Files.FileName.NotHyphenatedLowercase`.
See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44564 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 06:16:35 +00:00
Gary Pendergast 8cc49330a4 Coding Standards: Fix the minor `WordPress.WP.I18n` violations.
`WordPress.WP.I18n.MissingTranslatorsComment` is in progress in #44360.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44562 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 06:03:46 +00:00
Gary Pendergast df771316d1 Coding Standards: `template.php` isn't a template tag file.
`WordPress.Files.FileName.InvalidTemplateTagFileName` shouldn't apply to it.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44561 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 04:59:23 +00:00
Dominik Schilling (ocean90) ed1b4dc41f Build/Tools: Fix typo in `phpcs.xml.dist`.
See #44366.

git-svn-id: https://develop.svn.wordpress.org/trunk@44507 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 10:01:32 +00:00
Felix Arntz c12a0cf4f3 Multisite: Fix coding standard errors after [43654].
See #41333.


git-svn-id: https://develop.svn.wordpress.org/trunk@43655 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-24 15:22:01 +00:00
Felix Arntz ffa16fa771 Upgrade/Install: Properly exclude the `admin/includesSchema.php` tests file for the `WordPress.DB.PreparedSQL.NotPrepared` sniff.
The way this was implemented in [43630] caused the file to be excluded for all sniffs, since PHPCS does not support file-wide ignores of a specific sniff at this point.

Props jrf.
See #44896.


git-svn-id: https://develop.svn.wordpress.org/trunk@43641 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-14 07:54:53 +00:00
Gary Pendergast a75d153eee Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.



git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-17 01:50:26 +00:00
jrf 3581d34bb0 Build/Tools: Update PHPCS ruleset for WP Core and related Composer setup.
`.gitignore` + `svn:ignore`:
* Add the typical filenames of overloaded PHPCS configs to `.gitignore`.

Composer:
* Use the `develop` (Packagist `dev-master`) version of WPCS as it contains lots of bugfixes.
* Remove the PHPCS dependency. This is a dependency of WPCS, not of WP Core itself. This will also make sure that the PHPCS version used is always one which is supported by WPCS.
* Refreshed the `composer.lock` file.

PHPCS ruleset:
* Removed a reference to a sniff which doesn't exist in WPCS yet.
* Use the PHPCS 3.x `basepath` option to clean up the file paths PHPCS shows in the reports.
* Use the PHPCS 3.x `parallel` option to enable parallel scanning whenever possible to speed up the scans.
* Whitelist the `wp-includes/l10n.php` file from issues being reported by the `WordPress.WP.I18n` sniff.

Fixes #44366.

git-svn-id: https://develop.svn.wordpress.org/trunk@43348 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-15 15:56:58 +00:00
John Blackbourn 790f1ef5da Build/Test Tools: Don't trigger the global variable override PHPCS sniff for core.
Props jrf

Fixes #43776


git-svn-id: https://develop.svn.wordpress.org/trunk@43013 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-28 00:44:50 +00:00
Gary Pendergast 81a48c2924 Coding Standards: Add the `phpcs.xml.dist` file.
See #41057.



git-svn-id: https://develop.svn.wordpress.org/trunk@42346 602fd350-edb4-49c9-b593-d223f7449a82
2017-12-01 03:40:04 +00:00