Page MenuHomePhabricator

Suggestion to add rule for sniffing phpDoc ref tags
Closed, DeclinedPublic

Description

In Wikimedia Gerrit repos, phpDoc reference tags are not sniffed, suggesting that there should be a rule in Wikimedia Code Sniffer tool to handle this. See an example patch: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/470825.

Also, @Jdlrobson's comment about this: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/470825/1//COMMIT_MSG#10.

Event Timeline

Also, should we consider updating the https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#Comments_and_documentation page on which type to use in the reference tag? For example we can have situations where one uses "boolean" instead of "bool" or "integer" instead of "int" which is valid and supported but for consistency reasons, should we stick to one option?

What is a "reference tag"? This is how we call the <ref> tags in the Cite extension, but this is certainly not meant here.

Anyway, as far as I can tell what this ticket here asks for (assuming it is only about the short forms of bool and int, but nothing else) is fully covered by various sniffs now.

Should be covered by existing sniffs now, per above