Skip to content

Commit

Permalink
Merge pull request #318 from Yoast/JRF/yoastcs-add-phpcsextra
Browse files Browse the repository at this point in the history
YoastCS: add dependency on PHPCSExtra and replace some sniffs with versions from Extra
  • Loading branch information
jrfnl authored Nov 3, 2023
2 parents b075884 + 9ab69a9 commit 6754fc3
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 523 deletions.
1 change: 1 addition & 0 deletions .github/workflows/basics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
run: >
composer require --no-update --no-scripts --no-interaction
squizlabs/php_codesniffer:"dev-master"
phpcsstandards/phpcsextra:"dev-develop"
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ The `Yoast` standard for PHP_CodeSniffer is comprised of the following:
* The `WordPress` ruleset from the [WordPress Coding Standards](https://github.com/WordPress/WordPress-Coding-Standards) implementing the official [WordPress PHP Coding Standards](https://make.wordpress.org/core/handbook/coding-standards/php/), with some [select exclusions](https://github.com/Yoast/yoastcs/blob/develop/Yoast/ruleset.xml#L29-L75).
* The [`PHPCompatibilityWP`](https://github.com/PHPCompatibility/PHPCompatibilityWP) ruleset which checks code for PHP cross-version compatibility while preventing false positives for functionality polyfilled within WordPress.
* Select additional sniffs taken from [`PHP_CodeSniffer`](https://github.com/squizlabs/PHP_CodeSniffer).
* Select additional sniffs taken from [`PHPCSExtra`](https://github.com/PHPCSStandards/PHPCSExtra).
* A number of custom Yoast specific sniffs.

Files within version management and dependency related directories, such as the Composer `vendor` directory, are excluded from the scans by default.
Expand Down
59 changes: 0 additions & 59 deletions Yoast/Docs/ControlStructures/IfElseDeclarationStandard.xml

This file was deleted.

65 changes: 0 additions & 65 deletions Yoast/Docs/Namespaces/NamespaceDeclarationStandard.xml

This file was deleted.

89 changes: 0 additions & 89 deletions Yoast/Sniffs/ControlStructures/IfElseDeclarationSniff.php

This file was deleted.

110 changes: 0 additions & 110 deletions Yoast/Sniffs/Namespaces/NamespaceDeclarationSniff.php

This file was deleted.

Loading

0 comments on commit 6754fc3

Please sign in to comment.