Skip to content

chore: migrate to rtcamp/wp-phpcs - #185

Open
justlevine wants to merge 1 commit into
mainfrom
chore/wp-phpcs
Open

justlevine wants to merge 1 commit into
mainfrom
chore/wp-phpcs

Conversation

@justlevine

@justlevine justlevine commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

What

Migrates to use wp-tooling for WPCS

Why

To deprecate + archive rtcamp/coding-standards-d

Related Issue(s):

How

AI Disclosure

Testing Instructions

Screenshots

Additional Info

Checklist

Open WordPress Playground Preview

@justlevine justlevine added the blocked DO NOT MERGE label Nov 22, 2026
Comment thread .phpcs.xml.dist
Comment on lines +66 to +103
<!--
@todo - Why are these left out of the rtCampWP ruleset?
-->
<rule ref="SlevomatCodingStandard.Classes.DisallowConstructorPropertyPromotion" />
<rule ref="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants" />
<rule ref="SlevomatCodingStandard.Exceptions.DisallowNonCapturingCatch" />
<rule ref="SlevomatCodingStandard.Functions.DisallowEmptyFunction" />
<rule ref="SlevomatCodingStandard.Functions.UnusedParameter" />
<rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation">
<properties>
<property name="ignoredAnnotationNames" type="array">
<element value="@phpstan-import-type" />
<element value="@phpstan-param" />
<element value="@phpstan-return" />
<element value="@phpstan-template" />
<element value="@phpstan-type" />
<element value="@phpstan-var" />
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine" />

<!-- @todo fix spacing upstream so we don't need to fix it here. -->
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces">
<properties>
<property name="linesCountAfterOpeningBrace" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.TraitUseSpacing">
<properties>
<property name="linesCountBeforeFirstUseWhenFirstInClass" value="0" />
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacingBeforeFirst" value="0" />
</properties>
</rule>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aryanjasala @Adi-ty - would love your thoughts here. Or more specifically why these are missing/different upstream

@codecov

codecov Bot commented Nov 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.90%. Comparing base (6b74113) to head (77ced6d).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #185      +/-   ##
============================================
+ Coverage     93.82%   94.90%   +1.07%     
  Complexity      112      112              
============================================
  Files            28       21       -7     
  Lines           486      471      -15     
  Branches          1        0       -1     
============================================
- Hits            456      447       -9     
+ Misses           29       24       -5     
+ Partials          1        0       -1     
Flag Coverage Δ
jest ?
unit 94.90% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked DO NOT MERGE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant