commons-cli
commons-cli copied to clipboard
CLI-329: introduce to Options the tracking of deprecated short and long opts
This allows you to migrate from a previous old short options to new ones.
In the Apache Solr project we would use it to support the migration of -zkHost to --zk-host for example by allowing the deprecated command line -zkHost to function, but logging an warning to the user with the preferred option name.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 92.28%. Comparing base (
9f6b23b) to head (a6161da). Report is 51 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #251 +/- ##
============================================
+ Coverage 91.90% 92.28% +0.38%
- Complexity 575 606 +31
============================================
Files 22 22
Lines 1247 1297 +50
Branches 210 215 +5
============================================
+ Hits 1146 1197 +51
+ Misses 63 60 -3
- Partials 38 40 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hello @epugh Thank you for your PR. This is not the way to go IMO.
- Deprecation should just be a boolean or an object that carries (a String
description, a Stringsince, and a booleanforRemoval, which is a combo of the stock annotation and Javadoc tag). - I don't think this library should always print to the console.
OptionBuilderis deprecated, we should not duplicate new features when added toOption.Builder
I propose https://github.com/apache/commons-cli/pull/252
Closing in favour of #252