Skip to content

Commit

Permalink
Merge pull request #355 from Yoast/feature/switch-to-fork-of-phpcs
Browse files Browse the repository at this point in the history
Switch to PHPCSStandards/PHP_CodeSniffer
  • Loading branch information
jrfnl authored Dec 12, 2023
2 parents 07a91b8 + 74fc465 commit d8217d0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Clean up: make sure to reset all the file changes made during testing!
#### Public properties

Some sniffs will behave differently based on the value of the sniff's `public` properties.
These properties can be set [from a custom ruleset](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset) or in a test situation, in-line using `// phpcs:set Yoast.Category.SniffName propertyName propertyValue`.
These properties can be set [from a custom ruleset](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Annotated-Ruleset) or in a test situation, in-line using `// phpcs:set Yoast.Category.SniffName propertyName propertyValue`.

If the results you are getting when testing are different from what you expected, first thing to do is to check whether the sniff has `public` properties, what those properties are set to (in your custom ruleset or in a test file in-line) and whether that setting is interferring with the results.

Expand Down
2 changes: 1 addition & 1 deletion .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!--
#############################################################################
COMMAND LINE ARGUMENTS
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
#############################################################################
-->

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ This project adheres to [Semantic Versioning](https://semver.org/) and [Keep a C
Initial public release as a stand-alone package.


[PHP_CodeSniffer]: https://github.com/squizlabs/PHP_CodeSniffer/releases
[PHP_CodeSniffer]: https://github.com/PHPCSStandards/PHP_CodeSniffer/releases
[WordPressCS]: https://github.com/WordPress/WordPress-Coding-Standards/blob/develop/CHANGELOG.md
[PHPCompatibilityWP]: https://github.com/PHPCompatibility/PHPCompatibilityWP#changelog
[PHPCompatibility]: https://github.com/PHPCompatibility/PHPCompatibility/blob/master/CHANGELOG.md
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Typically, (a variation on) the following snippet would be added to the `compose

## PHP Code Sniffer

Set of [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) rules.
Set of [PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) rules.

Severity levels:

Expand All @@ -65,7 +65,7 @@ Severity levels:
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 [`PHP_CodeSniffer`](https://github.com/PHPCSStandards/PHP_CodeSniffer).
* Select additional sniffs taken from [`PHPCSExtra`](https://github.com/PHPCSStandards/PHPCSExtra).
* A number of custom Yoast specific sniffs.

Expand Down Expand Up @@ -93,7 +93,7 @@ Not all sniffs have documentation available about what they sniff for, but for t
"vendor/bin/phpcs" --extensions=php /path/to/folder/
```

For more command-line options, please have a read through the [PHP_CodeSniffer documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage).
For more command-line options, please have a read through the [PHP_CodeSniffer documentation](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Usage).

#### Yoast plugin repositories

Expand Down
2 changes: 1 addition & 1 deletion Yoast/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!--
#############################################################################
COMMAND LINE ARGUMENTS
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
#############################################################################
-->

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"php-parallel-lint/php-console-highlighter": "^1.0.0",
"php-parallel-lint/php-parallel-lint": "^1.3.2",
"phpcompatibility/phpcompatibility-wp": "^2.1.4",
"phpcsstandards/phpcsextra": "^1.1.2",
"phpcsstandards/phpcsutils": "^1.0.8",
"squizlabs/php_codesniffer": "^3.7.2",
"phpcsstandards/phpcsextra": "^1.2.1",
"phpcsstandards/phpcsutils": "^1.0.9",
"squizlabs/php_codesniffer": "^3.8.0",
"wp-coding-standards/wpcs": "^3.0.1"
},
"require-dev": {
Expand Down

0 comments on commit d8217d0

Please sign in to comment.