Add repository-wide PHPCS specification and PR enforcement workflow#572
Closed
Add repository-wide PHPCS specification and PR enforcement workflow#572
Conversation
Co-authored-by: dd32 <767313+dd32@users.noreply.github.com> Agent-Logs-Url: https://github.com/WordPress/wordpress.org/sessions/87d69254-9865-4e0f-8bf1-ccba8f75eb13
Copilot
AI
changed the title
[WIP] Add PHPCS action for PRs and specification for repository
Add repository-wide PHPCS specification and PR enforcement workflow
Mar 24, 2026
4 tasks
Member
|
Claude took over in #573 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No coding standards were enforced in this repo, allowing non-WordPress-standard code (e.g., spaces instead of tabs) to land via PRs.
Changes
phpcs.xml.dist— Root-level PHPCS ruleset applyingWordPressandWordPress-Docsstandards to all PHP files repo-wide; excludesvendor/,node_modules/, and JS/CSS files.composer.json— Root-level dev dependencies:squizlabs/php_codesniffer,wp-coding-standards/wpcs,phpcsstandards/phpcsutils, anddealerdirect/phpcodesniffer-composer-installer(auto-registers WPCS paths with PHPCS oncomposer install)..github/workflows/phpcs.yml— Runs PHPCS on PRs and trunk pushes viashivammathur/setup-php. Outputs inline PR annotations viacs2pr. Usescontinue-on-error: trueto surface violations without immediately blocking PRs while existing code is brought into compliance. Scoped permissions:contents: read,checks: write..gitignore— Addedvendor/to root ignore.Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.