Commit e7e2e3c
style(tests): reindent tests/ to tabs, and enforce it (#1005)
* style(tests): reindent to tabs, and enforce it
tests/ was split 249 files on four spaces against 170 on tabs, with nothing
enforcing either — phpcs.xml.dist excludes the directory. A reformat alone
would have drifted back within a week, so the gate is the point: phpcs-tests.
xml.dist carries exactly two sniffs (DisallowSpaceIndent, ScopeIndent) and runs
over the whole directory in the PHPCS workflow, not only over changed files.
The exclusion in the main ruleset stays. WordPress-Docs would demand a file,
class and method docblock in all 420 files, which is a project rather than a
cleanup, and widening this second ruleset is how it stops being cheap.
The conversion was mechanical and verified rather than eyeballed: leading
spaces to tabs at four columns, then expanded back and compared byte for byte
against the original. Every one of the 249 files round-tripped exactly, which
is what proves only leading indentation moved. tests/ contains no heredoc or
nowdoc, so the usual hazard of reindenting inside a string literal does not
arise. One file (UserProfileRestControllerTest) held 512 space-indented lines
and a single stray tab — that line was normalised to spaces first so the same
round-trip check applied to it too.
The diff is 95,675 insertions against 95,675 deletions, and every file parses.
The five dependency-free guards pass, and the vacuous-test baseline regenerates
identical, so the reindent did not shift what AssertionCoverageTest reads.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NuKPjGyg2b8t48Vr9dB7sm
* docs(changelog): note the tests/ reindent + indentation gate (#1005)
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent c5b89aa commit e7e2e3c
254 files changed
Lines changed: 95734 additions & 95675 deletions
File tree
- .github/workflows
- tests
- Unit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| 265 | + | |
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
0 commit comments