thiemowmde added a comment.
I feel like we need to talk about this a little more. > We call them the Wikimedia coding standards. Yes, and no. Sure, one of the purposes of the #mediawiki-codesniffer <https://phabricator.wikimedia.org/tag/mediawiki-codesniffer/> is to encode https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP. But the two are not entirely identical. The manual page lists things that aren't or just can't be checked by a sniff (for example, it's probably impossible to tell if a `==` should be a `===` or vice versa). And we have more and more sniffs for details that are not listed on the manual page. For example, the manual page doesn't say anything about `assertCount` and such – yet we have sniffs that discourage using certain combinations. That alone is not a problem. We typically think of a coding standard as something that should ideally apply to 100% of all code. When code doesn't conform, it should probably be rewritten. But here is the problem: We started to add more and more sniffs with known exceptions that are not "broken" and don't need "fixing". Other sniffs are disputable. For example, I think that the extra space in `@param bool $enable` really, really isn't a problem (this happens when you vertically align multiple @param). It should be ok when the owner of a codebase excludes this. T264948 <https://phabricator.wikimedia.org/T264948> is a another example that already caused issues, see T269332 <https://phabricator.wikimedia.org/T269332>. Is this a problem? Shouldn't be. We have know solutions, e.g. using `// phpcs:…` comments or `<severity>`, as discussed above. But it can become an issue when a sniff's message or a tool like #libup <https://phabricator.wikimedia.org/tag/libup/> create the impression that the owner of a codebase is doing something wrong – when they don't. It's about the tone. That's why I hope we can do more fine-tuning like this <https://gerrit.wikimedia.org/r/c/mediawiki/tools/codesniffer/+/654807/4/MediaWiki/Sniffs/Commenting/DocumentationTypeTrait.php>. TASK DETAIL https://phabricator.wikimedia.org/T266823 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Addshore, thiemowmde Cc: WMDE-leszek, Umherirrender, Legoktm, Lucas_Werkmeister_WMDE, Jdforrester-WMF, thiemowmde, Aklapper, Michael, Ladsgroup, Addshore, Akuckartz, Iflorez, alaa_wmde, DannyS712, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Lethexie, _jensen, rosalieper, Scott_WUaS, Jonas, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331, Jay8g
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs