cakephp / cakephp-codesniffer

CakePHP Code Sniffer
http://cakephp.org
MIT License
238 stars 85 forks source link

ECS Support #389

Closed challgren closed 1 year ago

challgren commented 1 year ago

My company has recently been switching over to ECS https://github.com/easy-coding-standard/easy-coding-standard for our coding standards and automatic rector rules. I was wondering if it's on the roadmap to support ECS? Since I'm in the process of migrating I could write the CakePHPSet and convert the phpcs.xml to ecs. But this would introduce having to maintain duplicate codes because they both follow the same format just in different ways. I wouldn't be able to help write a convertor but I think that would be the easiest forward. Just opening up a discussion on this since ECS and rector along with this repo have kept my code clean and developers from introducing older coding styles.

ADmad commented 1 year ago

There are no plans to switch to / add support for ECS. phpcs does its job well enough and its accompanying binary phpcbf autofixes most reported issues. So there's need for us to switch or increase the team's workload by supporting another code formatter.

CakePHP users are welcome to use the tools and standards they like instead of this one.

challgren commented 1 year ago

The only change would be converting the ruleset.xml to ecs.php which could easily be maintained going forward. And this would give users the ability to use 1 tool instead of both phpcs and phpcbf as ECS allows fixes to be applied. All the Sniffs and Fixers would be reused by ECS so there wouldn't be duplicate coding. It would just be keep the ruleset.xml and ecs.php in sync.

markstory commented 1 year ago

Sounds like work for your company to take on as you're switching to ECS.

LordSimal commented 1 year ago

I don't see what real benefit ECS would give us here besides

Did I miss something?