Page MenuHomePhabricator

Add sniff to ensure doc blocks don't use "@cover", but "@covers" instead
Closed, ResolvedPublic

Description

With https://gerrit.wikimedia.org/r/#/c/378268/1 a @cover is changed to @covers for function comments,
but @covers is also valid on class comments, which needs a new sniff to avoid use of @cover

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 16 2017, 12:02 PM

Change 378384 had a related patch set uploaded (by Zoranzoki21; owner: Umherirrender):
[mediawiki/extensions/Cognate@master] Fix @cover to @covers

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

Change 378384 merged by jenkins-bot:
[mediawiki/extensions/Cognate@master] Fix @cover to @covers

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

Krinkle renamed this task from Add sniff to check for wrong @cover in class comments to Add sniff to ensure doc blocks don't use "@cover", but "@covers" instead.Oct 26 2017, 5:17 PM
Krinkle triaged this task as Normal priority.
Krinkle moved this task from Untriaged to Accepted rule changes on the MediaWiki-Codesniffer board.
Legoktm closed this task as Resolved.Oct 26 2017, 5:26 PM
Legoktm assigned this task to Jdforrester-WMF.
Legoktm added a subscriber: Legoktm.

Oh, whoops, didn't look for a task. Thanks!

The task was created because the sniff only looks for function docs, not class docs where a @covers could be added to.

In my opinion that part is not done.

This could be done by refactoring the fix out of the function sniff and look for it on all doc blocks.

Legoktm reopened this task as Open.Oct 26 2017, 5:53 PM

Ah, you're right.

Umherirrender removed Jdforrester-WMF as the assignee of this task.Dec 26 2017, 10:19 PM
Umherirrender added a subscriber: Jdforrester-WMF.

Change 418732 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/tools/codesniffer@master] Validate phpunit annotations

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

Change 418732 merged by jenkins-bot:
[mediawiki/tools/codesniffer@master] Validate phpunit annotations

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

Umherirrender closed this task as Resolved.Mar 15 2018, 5:46 PM
Umherirrender claimed this task.