Since mw codesniffer 0.5.1 has been released it has been sniffing the .git folder as it did at https://gerrit.wikimedia.org/r/#/c/248379/
It should not be doing that since the .git folder only has information for the git programme.
Since mw codesniffer 0.5.1 has been released it has been sniffing the .git folder as it did at https://gerrit.wikimedia.org/r/#/c/248379/
It should not be doing that since the .git folder only has information for the git programme.
Subject | Repo | Branch | Lines /- | |
---|---|---|---|---|
Exclude common folders | mediawiki/tools/codesniffer | master | 5 -0 |
Hmm, I can't reproduce:
km@km-tp ~/p/v/m/e/AbsenteeLandlord> ./vendor/bin/phpcs -v Registering sniffs in the standard... DONE (54 sniffs registered) Creating file list... DONE (1 files in queue) Changing into directory /home/km/projects/vagrant/mediawiki/extensions/AbsenteeLandlord Processing AbsenteeLandlord.php [PHP => 410 tokens in 58 lines]... DONE in 14ms (0 errors, 0 warnings)
Oh, no. I just had to create a .php file inside .git:
km@km-tp ~/p/s/AbsenteeLandlord> ./vendor/bin/phpcs -v Registering sniffs in the standard... DONE (54 sniffs registered) Creating file list... DONE (2 files in queue) Changing into directory /home/km/projects/sandbox/AbsenteeLandlord Processing AbsenteeLandlord.php [PHP => 410 tokens in 58 lines]... DONE in 13ms (0 errors, 0 warnings) Changing into directory /home/km/projects/sandbox/AbsenteeLandlord/.git Processing test.php [PHP => 0 tokens in 0 lines]... DONE in 0ms (0 errors, 1 warnings)
After further testing, it appears this isn't a new problem to 0.5.1. I can reproduce this issue going all the way back to 0.1.0.
Sorry, while phpcs.xml works for individual repositories, we should probably be changing this in ruleset.xml using <exclude-pattern> I think.
Change 362266 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/tools/codesniffer@master] Exclude common folder
Change 362266 merged by jenkins-bot:
[mediawiki/tools/codesniffer@master] Exclude common folders