Mention --replace instead of --in-place in the dry-run error - #1451
Open
rootkiller6788 wants to merge 1 commit into
Open
Mention --replace instead of --in-place in the dry-run error#1451rootkiller6788 wants to merge 1 commit into
rootkiller6788 wants to merge 1 commit into
Conversation
The in-place option is spelled -i/-r/-replace/--replace on the command line; --in-place doesn't exist. The usage error for combining --dry-run with in-place formatting named a flag users never type, which made the message read like a bug. Point it at --replace (the long form listed in the help text) and add a test that triggers the error through --replace rather than only through the -i shorthand.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--dry-run combined with in-place formatting fails with "cannot use --dry-run and --in-place at the same time", but --in-place isn't an option. The flag is -i/-r/-replace/--replace, so the error names something users never type.
Changed the message to reference --replace (the long form shown in --help) and extended CommandLineFlagsTest to trigger the error through the --replace --dry-run spelling as well as the -i -n shorthand.
mvn -pl core test -Dtest=CommandLineFlagsTest passes (8/8).