Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a command-line argument to list all existing rulesets #5621

Closed
MaXal opened this issue Apr 12, 2021 · 3 comments
Closed

Provide a command-line argument to list all existing rulesets #5621

MaXal opened this issue Apr 12, 2021 · 3 comments

Comments

@MaXal
Copy link

MaXal commented Apr 12, 2021

In PhpStorm there is a chooser to run a predefined ruleset but available rulesets are hard-coded since there is no easy way to fetch them from CS-Fixer.
For now, we have the following standards: "PSR1", "PSR2", "Symfony", "DoctrineAnnotation", "PHP70Migration", "PHP71Migration" and looking into https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/2.18/src/RuleSet/Sets it looks like the list is far from complete.

Since we support different versions of PHP-CS-Fixer, a command-line option that outputs the available standards will allow us to list all rulesets instead of a limited list supported by 2.8.0 (the earliest version we support).

@keradus
Copy link
Member

keradus commented Apr 18, 2021

@MaXal , please check the PR #5635

@MaXal
Copy link
Author

MaXal commented Apr 23, 2021

Answered in #5635.
The suggested solution works great in PhpStorm.

Are you going to merge PR before 3.0 release?

keradus added a commit that referenced this issue Apr 24, 2021
This PR was squashed before being merged into the 2.19-dev branch.

Discussion
----------

Add list-sets command

closes #5621
example: `php php-cs-fixer list-sets --format json`

Commits
-------

ddf9c0e Add list-sets command
@keradus keradus closed this as completed Apr 24, 2021
@keradus
Copy link
Member

keradus commented Apr 24, 2021

Thanks @MaXal , great to hear!

yes, the PR was merged to 2.19@dev line and will be released under 2.19.0 in near future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants