Page MenuHomePhabricator

"Stylize" tools ignore spaces at beginning of lines
Open, Needs TriagePublic

Description

I had a PHP file whose formatting was all correct except for the spaces/tabs at the beginning of each line, which were almost all incorrect - you can see it here:

https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/ExternalData/+/601933/1/includes/EDJsonObject.php,unified

I ran it through both the Stylize tool (https://tools.wmflabs.org/stylize/) and the stylize.php script (https://phabricator.wikimedia.org/diffusion/MCUT/browse/master/stylize.php), and in both cases there was no change to the file; the bad spaces and tabs at the beginning of each line were ignored. (And then this file also passed Jenkins validation, but that's another story.)

Should the "stylize" tools really not do anything with the spacing at the beginning of each line? The PHP coding conventions specifically say "Indent with tabs, not spaces."