Is your feature request related to a problem? Please describe.
Currently our CLI uses ugly BSD-style options (long options with a single dash). Using a double dash for long options is more usual in modern programs (this is "GNU style"). Also our names are inconsistent,
- eg
-failOnViolation also has the variant --failOnViolation as synonym, but it's the only option that does
- eg we use inconsistent word splitting conventions throughout, eg
failOnViolation is camel case, -norulesetcompatibility is "clump-together case" as far as I'm concerned, while -no-cache is in the more usual style for long CLI options
Describe the solution you'd like
- Add long variants for all our CLI options that
- are GNU style (
--)
- use a consistent casing convention, eg
--fail-on-violation, --no-ruleset-compatibility
- Output a deprecation warning when the old variants are used.
- Remove the old variants in PMD 7
Additional thoughts:
-version should NOT be renamed to --version. As per the gnu standards, the --version option should instead print the version of PMD. I suggest renaming it to --use-version.
- CPD uses GNU style options and mostly uses
--this-style but --failOnViolation is camel case and could also be updated
- I'm not sure if we should rename
--filelist to --file-list. It feels like a single word now with a specialized meaning, but I'm not sure that's the case
Is your feature request related to a problem? Please describe.
Currently our CLI uses ugly BSD-style options (long options with a single dash). Using a double dash for long options is more usual in modern programs (this is "GNU style"). Also our names are inconsistent,
-failOnViolationalso has the variant--failOnViolationas synonym, but it's the only option that doesfailOnViolationis camel case,-norulesetcompatibilityis "clump-together case" as far as I'm concerned, while-no-cacheis in the more usual style for long CLI optionsDescribe the solution you'd like
--)--fail-on-violation,--no-ruleset-compatibilityAdditional thoughts:
-versionshould NOT be renamed to--version. As per the gnu standards, the--versionoption should instead print the version of PMD. I suggest renaming it to--use-version.--this-stylebut--failOnViolationis camel case and could also be updated--filelistto--file-list. It feels like a single word now with a specialized meaning, but I'm not sure that's the case