Page MenuHomePhabricator

MediaWiki Codesniffer not catching irrelevant characters after PHPDoc return types
Open, Needs TriagePublic


This little thingy patch: reveals that CS for some reason doesn't catch trailing characters after the types for a PHPDoc @return annotation.

Cases like;

@return array/

should be caught by phpcs and make Jenkins to fail explicitly. @thiemowmde suggest we also tag this as good first task :)

Event Timeline

xSavitar created this task.Jan 24 2019, 3:08 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 24 2019, 3:08 PM

It is looking for punctations (regex class \p{P} which include \ when looking at

But this file is ending with 'Test.php' which is skipped in the FunctionComment sniff to avoid docs of test functions/classes

Setian added a subscriber: Setian.EditedFeb 23 2019, 7:31 AM

What documentation should a newbie read to learn how to do this? Oh, I guess I'll take a look at for inspiration.