phpstan / phpstan-strict-rules

Extra strict and opinionated rules for PHPStan
MIT License
595 stars 46 forks source link

Unable to use rules one-by-one when using extension-installer #150

Closed nelson6e65 closed 2 years ago

nelson6e65 commented 2 years ago

I follow README documentation about this, but it states that it is not compatible with the usage of https://github.com/phpstan/extension-installer.

There is a way to only use rules I want for the moment? Like levels?

ondrejmirtes commented 2 years ago

If you want to keep using extension-installer, the only way to have only some rules enabled is through ignoring errors: https://phpstan.org/user-guide/ignoring-errors

It'd be quite easy to make this more friendly, with the help of conditionalTags and custom parameters for each enabled rule. For someone fluent in the configuration (https://phpstan.org/developing-extensions/dependency-injection-configuration) it's a work for 30-60 minutes at most.

nelson6e65 commented 2 years ago

If you want to keep using extension-installer, the only way to have only some rules enabled is through ignoring errors: https://phpstan.org/user-guide/ignoring-errors

Thanks! I'll ignore some of these errors in my config file for the moment.

It'd be quite easy to make this more friendly, with the help of conditionalTags and custom parameters for each enabled rule. For someone fluent in the configuration (https://phpstan.org/developing-extensions/dependency-injection-configuration) it's a work for 30-60 minutes at most.

🤔

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.