Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to new VIP-Coding-Standards PHPCS rules #1032

Closed
nickdaugherty opened this issue Dec 4, 2018 · 1 comment · Fixed by #1380
Closed

Switch to new VIP-Coding-Standards PHPCS rules #1032

nickdaugherty opened this issue Dec 4, 2018 · 1 comment · Fixed by #1380

Comments

@nickdaugherty
Copy link
Contributor

As noted by @GaryJones, this repo is still on the old PHPCS rules - we should switch over to https://github.com/Automattic/VIP-Coding-Standards instead, which is where active development is going.

@joshbetz
Copy link
Contributor

joshbetz commented Jan 9, 2019

The old WordPress-VIP rules have been deleted from the WPCS repo WordPress/WordPress-Coding-Standards#1551

joshbetz added a commit that referenced this issue Jan 11, 2019
The WordPress-VIP standard was deleted from Github, breaking our tests.
Removing this for now, until PHPCS is updated in #1032.
GaryJones added a commit that referenced this issue Dec 14, 2019
No behavioural change, but makes it easier to follow why certain directories have been excluded.

See #1032.
GaryJones added a commit that referenced this issue Dec 14, 2019
This ensures that local development is using the correct versions of PHPCS standards.

See #1032.
GaryJones added a commit that referenced this issue Dec 14, 2019
These submodules were apparently added after the exclusion list was last updated.

See #1032.
GaryJones added a commit that referenced this issue Dec 14, 2019
 - Add comments and links for those not familiar with PHPCS configuration file.
 - Add a default starting point for scanning. Can be overridden in the command line.
 - Exclude `vendor/` directory, since this is third-party code.
 - Add options to show violation code and progress.
 - Add basepath option so reports don't include full absolute path to file.
 - Add parallel processing for quicker reporting of PHPCS.
 - Limit scans to PHP files (copied from preference in Makefile). PHPCS 4 will remove the JS tokenizer anyway.
 - Add PHPCompatibilityWP ruleset, with a testVersion of 7.3 and above.
 - Change from deprecated / removed `WordPress-VIP` ruleset in WordPress Coding Standards, to `WordPress-VIP-Go` ruleset from VIP Coding Standards.

See #1032.
GaryJones added a commit that referenced this issue Dec 14, 2019
While the code in these files would fail `WordPress-Core` standard, that is not something we're checking for, so there is no reason to exclude them. They do not have any violations according to PHPCompatibilityWP and WordPress-VIP-Go standards.

If WPCS was added later on, then there is a better way to exclude them for WPCS, rather than excluding them from _all_ PHPCS checks (including PHPCompatibilityWP and WordPress-VIP-Go).

See #1032.
GaryJones added a commit that referenced this issue Dec 14, 2019
 - Add comments and links for those not familiar with PHPCS configuration file.
 - Add a default starting point for scanning. Can be overridden in the command line.
 - Exclude `vendor/` directory, since this is third-party code.
 - Add options to show violation code and progress.
 - Add basepath option so reports don't include full absolute path to file.
 - Add parallel processing for quicker reporting of PHPCS.
 - Limit scans to PHP files (copied from preference in Makefile). PHPCS 4 will remove the JS tokenizer anyway.
 - Add PHPCompatibilityWP ruleset, with a testVersion of 7.3 and above.
 - Change from deprecated / removed `WordPress-VIP` ruleset in WordPress Coding Standards, to `WordPress-VIP-Go` ruleset from VIP Coding Standards.

See #1032.
GaryJones added a commit that referenced this issue Dec 14, 2019
While the code in these files would fail `WordPress-Core` standard, that is not something we're checking for, so there is no reason to exclude them. They do not have any violations according to PHPCompatibilityWP and WordPress-VIP-Go standards.

If WPCS was added later on, then there is a better way to exclude them for WPCS, rather than excluding them from _all_ PHPCS checks (including PHPCompatibilityWP and WordPress-VIP-Go).

See #1032.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants