Page MenuHomePhabricator

Add PHP_CodeSniffer for codestyle checks to WikiLexicalData extension
Closed, ResolvedPublic

Description

While working on T177809, I have noticed, that CI job lacks codestyle checks and PHP_CodeSniffer scripts are not present in composer.json of WikiLexicalData extension.

I think it is important to add this to ensure that code of this extension remains clean.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 22 2018, 2:33 PM

I will add this and fix code style issues if those will be detected

Change 406044 had a related patch set uploaded (by Phantom42; owner: Phantom42):
[mediawiki/extensions/WikiLexicalData@master] Add PHP_CodeSniffer for codestyle checks

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

After enabling phpcs I noticed that there are a lot of rule violations here. I decided that it will be better to exclude all failing rules now and then fix them part-by-part in next patches. This will make code style fixes easier to review and merge. Additionally, I faced internal CodeSniffer error which I reported in T185642.

Change 406044 merged by Umherirrender:
[mediawiki/extensions/WikiLexicalData@master] Add PHP_CodeSniffer for codestyle checks

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

Umherirrender closed this task as Resolved.Feb 25 2018, 11:23 AM
Umherirrender triaged this task as Normal priority.