Page MenuHomePhabricator

phpcs not running on all files
Closed, ResolvedPublic

Description

Investigate why phpcs is not running on the following files:

ChangeTagsLogItem.php
RevDelLogItem.php
GitInfo.php

The file does not have a @codingStandardsIgnore tag

(From https://gerrit.wikimedia.org/r/#/c/276778/)

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 11 2016, 5:50 PM

Change 367117 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/tools/codesniffer@master] Don't ignore files or paths with "git" in them, only .git

https://gerrit.wikimedia.org/r/367117

Legoktm claimed this task.Jul 23 2017, 12:26 AM
Legoktm added subscribers: Reedy, Legoktm.

@Reedy ran into this last week as well. Our pattern for ignoring .git directories was just .git, where the period matched anything. So you have ChangeTagsLogItem.php and RevDelLogItem.php.

Changing the pattern to \.git should fix it.

Change 367117 merged by jenkins-bot:
[mediawiki/tools/codesniffer@master] Don't ignore files or paths with "git" in them, only .git

https://gerrit.wikimedia.org/r/367117

We should probably fix repos (mw core included) with this problem where they have the same/similar exclude

	<exclude-pattern>.git</exclude-pattern>

Once repositories update to the latest version, we can remove the per-repository <exclude-pattern> rules since they'll inherit from the centrally maintained one.

Change 367119 had a related patch set uploaded (by Legoktm; owner: Reedy):
[mediawiki/core@master] phpcs.xml: Escape . in exclude-pattern

https://gerrit.wikimedia.org/r/367119

Change 367119 merged by jenkins-bot:
[mediawiki/core@master] phpcs.xml: Escape . in exclude-pattern

https://gerrit.wikimedia.org/r/367119

Umherirrender closed this task as Resolved.Jul 25 2017, 5:56 PM