Consistent indentation for test files
| From: | Nikita Popov | Date: | Sat, 28 Oct 2017 11:59:51 +0000 |
| Subject: | Consistent indentation for test files | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-100978@lists.php.net to get a copy of this message | ||
Hi internals,
Right now we do not have a consistent standard for the indentation of PHPT
files. Some people create space-indented files, others create tab-indented
files. Over time, indentation invariably starts to mix, because developers
with different indentation settings work on one file.
Here are the current statistics for code in .phpt files:
total: 15515
prefer tabs: 4273 (27.5%)
prefer spaces: 6307 (40.7%)
draw: 77 (0.5%)
no indentation: 4858 (31.3%)
There are 1824 (11.8%) files that contain mixed tab and space indentation.
The indentation was determined based on the first character of a line.
I would like to propose that we establish a common standard by
a) using space indentation for all future tests (as they currently form the
majority), and
b) reindenting existing test files to use space indentation.
Thanks,
Nikita
PS: Motivated by https://github.com/php/php-src/pull/2879. PRs
regularly
have WS issues.