Fix ScopeIndent whitespace violations across the codebase#708
Open
obenland wants to merge 1 commit into
Open
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
0b26a96 to
79ab0b1
Compare
Run phpcbf with the Generic.WhiteSpace.ScopeIndent sniff to correct indentation across the tree. Changes are whitespace-only. Also manually re-indent the commented-out array entries in the core credits files, which phpcbf left one tab short of their sibling array() entries. Exclude mu-plugins/pub/locales/locales.php from phpcs: it is a verbatim copy of GlotPress' locales.php kept in sync with upstream, so our coding standards should not be applied to it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdcXQ8385jCLecyxmsCrqT
79ab0b1 to
72f77ea
Compare
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.
What
Whitespace-only cleanup. Ran
phpcbfwith a single sniff across the tree:That corrected
Generic.WhiteSpace.ScopeIndenterrors across 186 files.Additionally:
array()entries in the core credits files were manually re-indented —phpcbfleft them one tab short of their siblingarray()entries, so they're now aligned to the surrounding list.mu-plugins/pub/locales/locales.phpis excluded from PHPCS rather than reindented. It is a verbatim copy of GlotPress'locales.php, pinned to an upstream commit and kept in sync — applying our coding standards would make it diverge and complicate future syncing. Its reindent was reverted and anexclude-patternadded.Why
These are already-enabled sniff violations sitting in existing code. Cleaning them up shrinks what surfaces on future PRs that touch these files (CI's
phpcs-branch.phpreports on changed lines, so untouched-but-dirty lines re-appear as noise whenever a nearby line changes).Notes
exclude-patterninphpcs.xml.dist.ScopeIndentwas already active — no sniff was newly enabled.?w=1) shows only thephpcs.xml.distline.🤖 Generated with Claude Code
https://claude.ai/code/session_01VdcXQ8385jCLecyxmsCrqT