Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

point users to init project command if they forget a supported argument in any command (DAT-8641) #2356

Merged
merged 7 commits into from Jan 19, 2022

Conversation

StevenMassaro
Copy link
Contributor

This is a bit of a heavy-handed approach to this, and it does not have to be.

There are two commits:
First, the actual change. This is to adjust the message thrown by the exception during the validation stage of each argument.
Second, refactoring all existing commands which use any of the supported arguments to all use common code for the initialization of the argument. I did this primarily because I was concerned that the equality check would fail if one developer instantiated a command argument in a slightly different way (changelogfile vs changelogFile, for example)

.description("The root changelog file").build();
URL_ARG = builder.argument("url", String.class).required()
URL_ARG = builder.argument(CommonArgumentNames.URL, String.class).required()
.description("The JDBC database connection URL").build();
DEFAULT_SCHEMA_NAME_ARG = builder.argument("defaultSchemaName", String.class)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While they aren't as commonly used, defaultSchemaName and driverPropertiesFile are part of the set of common arguments across commands.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was contemplating changing around the other arguments as well. I'll do that in another PR to keep things nice and separate.

@StevenMassaro StevenMassaro merged commit a9b2c81 into master Jan 19, 2022
@StevenMassaro StevenMassaro deleted the DAT-8641 branch January 19, 2022 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants