joomla / coding-standards

Joomla Coding Standards Definition
https://developer.joomla.org/coding-standards/basic-guidelines.html
GNU General Public License v2.0
128 stars 129 forks source link

jedchecker rules migrated to PHPCS 3.x #247

Closed Texpaok closed 5 years ago

Texpaok commented 5 years ago

Hi there,

This pull request tries to migrate current jed checker rules to PHPCS 3.x branch.

mbabker commented 5 years ago

If the intent is to make JED Checker rules a PHPCS sniff, then this would need to be a new ruleset and not something applied to the coding standards used for all Joomla projects (similar to how there is https://github.com/joomla/cms-coding-standards which "extends" this repository for rules specifically used in the CMS that wouldn't apply to the Framework packages, like the defined or die check). We couldn't merge this here if we wanted since the CMS and the Framework repositories are using this repo to pull their rulesets; they would all never pass PHPCS because of things like the base64 check or the database API having direct database access.

Texpaok commented 5 years ago

Hi Michael,

Yes, that's the idea. I will add the changes to the repository you suggest.

Thank you very much.

mbabker commented 5 years ago

They can't be added to that repository because unless I'm mistaken the intent is to have the CMS use that repository, which would make the CMS fail.

It would need to be an entirely new repository that "extends" the CMS coding standard repo in the same way that repo "extends" this one. Long and short, the JED checker rules cannot be directly implemented into the core coding standards, it MUST be an extended ruleset.