Page MenuHomePhabricator

Fix Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
Closed, ResolvedPublic


The difficult, and worst offenders here are the ResourceLoader tests that have embedded js, but use spaces not tabs

Fixing those give it causes whitespace related errors in

The other files would be the xml backup files which embed xml, and have leading spaces rather than tabs...

Event Timeline

Reedy raised the priority of this task from to Needs Triage.
Reedy updated the task description. (Show Details)

Trying the xml dump/backup tests spaces -> tabs in ....

So, speaking to @Legoktm, he was going to file an upstream issue about "leading spaces" when they were in strings...

Might be worth reverting the backup tests commit in the near future when that's fixed...

Reedy changed the task status from Open to Stalled.Sep 26 2015, 8:10 PM

Filed an issue for leading spaces in strings showing as a warning

Not a lot we can do about this till it's fixed upstream...

I tested this by updating CodeSniffer, and the issue was gone. Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed's code has changed and no longer checks for T_CONSTANT_ENCAPSED_STRING, so the issue no longer occurs. The CodeSniffer dependency was updated in rMCSN9a1a1acc5e8c: Update squizlabs/php_codesniffer to 2.3.4, but we still have to cut a new version ( T113516: Release version 0.4.0 of mediawiki/tools/codesniffer ). Once that is done, we can update core's version of mediawiki-codesniffer and we should be good to go.

Change 243419 had a related patch set uploaded (by Umherirrender):
Enable Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed

Change 243419 merged by jenkins-bot:
Enable Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed

Umherirrender set Security to None.