php-coding-standard-generator icon indicating copy to clipboard operation
php-coding-standard-generator copied to clipboard

Thoughts on how this tool could be simpler

Open reinink opened this issue 11 years ago • 0 comments

I'm a big fan of PHP CodeSniffer, and recently came across this project as a result of trying to make a custom ruleset myself.

While I totally understand why it's built in this way (around existing standards/sniffs), I wonder if it would be more helpful to developers if presented in a more understandable format to them. For example (rough):

  • General
    • Indentation: Ignore/Tabs/Spaces
    • End of file: Ignore/One blank line/No blank lines
  • Classes
    • Namespaces: Ignore/Require
    • Opening brackets: Ignore/Same line/New line

I know this approach may not work for everything, but probably most things. Then, in the background, the tool can determine which sniffs are required to implement those rules.

To help further, it would be great to show an example code snippet for each possible option, helping them see visually the difference between each setting.

Last, you could even have the option to pre-fill the form based on an existing standard (ie. PSR2).

Just some ideas. Let me know what you think!

reinink avatar Apr 01 '14 17:04 reinink