Skip to content

Commit

Permalink
Exclude `VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariabl…
Browse files Browse the repository at this point in the history
…e` for deprecated code
  • Loading branch information
enricobattocchi committed May 3, 2024
1 parent 8a73452 commit 72c241e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@
<exclude-pattern>/inc/wpseo-functions-deprecated\.php$</exclude-pattern>
</rule>

<!-- Ignore unused variables in deprecated functionality. -->
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable">
<exclude-pattern>/src/deprecated/*</exclude-pattern>
<exclude-pattern>/inc/wpseo-functions-deprecated\.php$</exclude-pattern>
</rule>

<!-- Exclude deprecated code from select sniffs regarding naming conventions.
These classes are still available to prevent BC-breaks and renaming them would
create a BC-break. -->
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
],
"check-cs-thresholds": [
"@putenv YOASTCS_THRESHOLD_ERRORS=2545",
"@putenv YOASTCS_THRESHOLD_WARNINGS=267",
"@putenv YOASTCS_THRESHOLD_WARNINGS=253",
"Yoast\\WP\\SEO\\Composer\\Actions::check_cs_thresholds"
],
"check-cs": [
Expand Down

0 comments on commit 72c241e

Please sign in to comment.