Skip to content

Fix ScopeIndent whitespace violations across the codebase#708

Open
obenland wants to merge 1 commit into
WordPress:trunkfrom
obenland:fix/scopeindent-whitespace
Open

Fix ScopeIndent whitespace violations across the codebase#708
obenland wants to merge 1 commit into
WordPress:trunkfrom
obenland:fix/scopeindent-whitespace

Conversation

@obenland

@obenland obenland commented Jul 13, 2026

Copy link
Copy Markdown
Member

What

Whitespace-only cleanup. Ran phpcbf with a single sniff across the tree:

./vendor/bin/phpcbf -d memory_limit=4G --standard=./phpcs.xml.dist \
  --sniffs=Generic.WhiteSpace.ScopeIndent .

That corrected Generic.WhiteSpace.ScopeIndent errors across 186 files.

Additionally:

  • The commented-out array() entries in the core credits files were manually re-indented — phpcbf left them one tab short of their sibling array() entries, so they're now aligned to the surrounding list.
  • mu-plugins/pub/locales/locales.php is 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 an exclude-pattern added.

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.php reports on changed lines, so untouched-but-dirty lines re-appear as noise whenever a nearby line changes).

Notes

  • Whitespace only across the 186 code files (1:1 insertions/deletions); the only non-whitespace change is the new exclude-pattern in phpcs.xml.dist.
  • ScopeIndent was already active — no sniff was newly enabled.
  • Reviewing with whitespace hidden (?w=1) shows only the phpcs.xml.dist line.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VdcXQ8385jCLecyxmsCrqT

Copilot AI review requested due to automatic review settings July 13, 2026 22:02
@github-actions

Copy link
Copy Markdown

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props obenland.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@obenland obenland force-pushed the fix/scopeindent-whitespace branch from 0b26a96 to 79ab0b1 Compare July 13, 2026 22:05
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
@obenland obenland force-pushed the fix/scopeindent-whitespace branch from 79ab0b1 to 72f77ea Compare July 13, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants