Skip to content

[core] Deprecate -language, -version, -min options #3426

@oowekyala

Description

@oowekyala

Is your feature request related to a problem? Please describe.
The couple of CLI options -language and -version are used to specify the language version to use when discovering a file for that language. They're virtually not documented, only work when they're specified together (and otherwise just don't do anything, but that doesn't produce a warning), and are not repeatable. Ultimately we could just use a single option and make it repeatable.
The option -min is a single-dash option for --minimum-priority. However, GNU style options allow to combine multiple single-dash options, so -min means actually -m -i -n. While we don't support this combination, keeping -min would prevent us from ever doing so.

Describe the solution you'd like

  • Introduce a new option --use-version (as per [core] Migrate CLI to using GNU-style long options #3424) which has arity 2 (language AND version number). It would be used like --use-version java 16.
  • Maybe make it repeatable if it's easy enough.
  • Deprecate -language and -version.
  • Deprecate -min in favor or --minimum-priority

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Relevant current issues:

Metadata

Metadata

Assignees

Labels

an:enhancementAn improvement on existing features / rulesin:cliAffects the PMD Command Line Interfaceis:deprecationThe main focus is deprecating public APIs or rules, eg to make them internal, or removing them

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions