Re: [PR] [CLI-336] Deprecation not always reported [commons-cli]
garydgregory commented on PR #284: URL: https://github.com/apache/commons-cli/pull/284#issuecomment-2176356452 @Claudenw Good luck 👍 with the move 💪 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [CLI-336] Deprecation not always reported [commons-cli]
Claudenw commented on PR #284: URL: https://github.com/apache/commons-cli/pull/284#issuecomment-2176303412 I am traveling and moving over thenext two weeks. I hope to get to this later this week, time permitting. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [CLI-336] Deprecation not always reported [commons-cli]
garydgregory commented on PR #284: URL: https://github.com/apache/commons-cli/pull/284#issuecomment-2165722143 @Claudenw ping -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [CLI-336] Deprecation not always reported [commons-cli]
garydgregory commented on PR #284: URL: https://github.com/apache/commons-cli/pull/284#issuecomment-2162857444 > I don't understand how coverage checks can not be met when the added methods are covered based on jacoco report. @Claudenw You are NOT testing ALL of the new APIs added in this PR. Run: ``` mvn clean install site -P jacoco -Dcommons.jacoco.haltOnFailure=false ``` Then open `target/site/jacoco` and navigate to `CommandLine` and the untested code will be marked in red. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [CLI-336] Deprecation not always reported [commons-cli]
garydgregory commented on code in PR #284: URL: https://github.com/apache/commons-cli/pull/284#discussion_r1636339569 ## src/main/java/org/apache/commons/cli/CommandLine.java: ## @@ -348,6 +348,44 @@ public String getOptionValue(final Option option, final Supplier default return answer != null ? answer : get(defaultValue); } +/** + * Gets the first argument, if any, of this option group. + * + * @param optionGroup the option group. + * @return Value of the argument if option group is selected, and has an argument, otherwise null. + * @since 1.9.0 + */ +public String getOptionValue(final OptionGroup optionGroup) { +final String[] values = getOptionValues(optionGroup); +return values == null ? null : values[0]; Review Comment: Is it possible for the array to be empty? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [CLI-336] Deprecation not always reported [commons-cli]
aherbert commented on PR #284: URL: https://github.com/apache/commons-cli/pull/284#issuecomment-2162658448 Codecov is currently broken. Uploads now require an authentication token for the master branch, but apparently not for PR branches. The master build codecov upload failed, see [last CI build](https://github.com/apache/commons-cli/actions/runs/9470109685/job/26090266928). So although the codecov uploaded from this PR, there is no record for the base commit and codecov errors with missing coverage. There is a ticket to resolve this by adding a token to all commons repos: [INFRA-25729](https://issues.apache.org/jira/browse/INFRA-25729). However generating an org level token requires an org level github account and apache does not have one. So this is an unresolved issue. It may require a move away from codecov to some other tool, or negotiation with codecov to provide an alternative authentication mechanism for open source repos. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [CLI-336] Deprecation not always reported [commons-cli]
Claudenw commented on PR #284: URL: https://github.com/apache/commons-cli/pull/284#issuecomment-2162589124 I don't understand how coverage checks can not be met when the added methods are covered based on jacoco report. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] [CLI-336] Deprecation not always reported [commons-cli]
Claudenw opened a new pull request, #284: URL: https://github.com/apache/commons-cli/pull/284 fixes for CLI-336 updated javadoc for OptionGroup.getSelected(), OptionGroup.isSelected() and OptionGroup.select() methods to indicate that deprecated options do not trigger logging of deprecated option usage. CommandLine methods hasOption(OptionGroup), getOptionValue(OptionGroup), getOptionValues(OptionGroup), and getParsedOptionValue(OptionGroup) methods. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org