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

Use two new sniffs from PHPCSExtra 1.2.0 #2409

Merged
merged 1 commit into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ When you introduce new `public` sniff properties, or your sniff extends a class
* WordPress-Coding-Standards
* PHP_CodeSniffer 3.7.2 or higher
* PHPCSUtils 1.0.8 or higher
* PHPCSExtra 1.1.0 or higher
* PHPCSExtra 1.2.0 or higher
* PHPUnit 4.x, 5.x, 6.x or 7.x

The WordPress Coding Standards use the `PHP_CodeSniffer` native unit test framework for unit testing the sniffs.
Expand Down
3 changes: 3 additions & 0 deletions WordPress-Core/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,9 @@
<!-- Important to prevent issues with content being sent before headers. -->
<rule ref="Generic.Files.ByteOrderMark"/>

<!-- Always have a lowertag PHP open tag. -->
<rule ref="Universal.PHP.LowercasePHPTag"/>

<!-- All line endings should be \n. -->
<rule ref="Generic.Files.LineEndings">
<properties>
Expand Down
3 changes: 3 additions & 0 deletions WordPress-Extra/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@
<!-- Detect useless "echo sprintf(...)". -->
<rule ref="Universal.CodeAnalysis.NoEchoSprintf"/>

<!-- Detect use of double negative `!!`. -->
<rule ref="Universal.CodeAnalysis.NoDoubleNegative"/>

<!--
#############################################################################
Code style sniffs for more recent PHP features and syntaxes.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"ext-xmlreader": "*",
"squizlabs/php_codesniffer": "^3.7.2",
"phpcsstandards/phpcsutils": "^1.0.8",
"phpcsstandards/phpcsextra": "^1.1.0"
"phpcsstandards/phpcsextra": "^1.2.0"
},
"require-dev": {
"phpcompatibility/php-compatibility": "^9.0",
Expand Down
Loading