PHPCompatibility / PHPModernizer

External PHPCS standard with auto-fixers to modernize legacy codebases
GNU Lesser General Public License v3.0
10 stars 0 forks source link

Generic config option: allowRisky #16

Open jrfnl opened 6 years ago

jrfnl commented 6 years ago

Add a generic config option allowRisky which defaults to false.

This option should be respected by all sniffs which do something which could be considered risky, i.e. might cause parse errors or unit tests to fail as the code change is more involved.

The option could be set using either --runtime-set allowRisky true or by adding <config name"allowRisky" value="true"/> to a custom ruleset.

Levels of riskiness

Alternatively, based on the same principle, a granularization could be added using numeric riskiness levels

My current line of thinking would be:

Opinions welcome!