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

Improve noargs message and add a help argument + detailed message #188

Merged
merged 5 commits into from
Aug 7, 2022
Merged

Improve noargs message and add a help argument + detailed message #188

merged 5 commits into from
Aug 7, 2022

Conversation

sschr15
Copy link
Member

@sschr15 sschr15 commented Aug 7, 2022

No description provided.

@jaskarth jaskarth self-assigned this Aug 7, 2022
@jaskarth jaskarth added Priority: High High priority Subsystem: User-Facing Anything concerning user facing code labels Aug 7, 2022
Copy link
Member

@jaskarth jaskarth left a comment

Choose a reason for hiding this comment

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

Thank you so much! I have a few comments to make.

@@ -60,10 +62,119 @@ else if (args.length > x+1) {
}
args = params.toArray(new String[params.size()]);

if (Arrays.stream(args).anyMatch(arg -> arg.equals("-h") || arg.equals("--help") || arg.equals("-help"))) {
String[] help = {
Copy link
Member

Choose a reason for hiding this comment

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

This array should be private static final, or the like

@@ -60,10 +62,119 @@ else if (args.length > x+1) {
}
args = params.toArray(new String[params.size()]);

if (Arrays.stream(args).anyMatch(arg -> arg.equals("-h") || arg.equals("--help") || arg.equals("-help"))) {
Copy link
Member

Choose a reason for hiding this comment

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

The content of this if body should be moved out to another method (or maybe even another class) because the main method is getting very long

Copy link
Member

@jaskarth jaskarth left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@jaskarth jaskarth merged commit 688a603 into Vineflower:master Aug 7, 2022
jaskarth added a commit that referenced this pull request Aug 7, 2022
@github-actions
Copy link

github-actions bot commented Aug 7, 2022

Test Results

     12 files  ±0       12 suites  ±0   43s ⏱️ ±0s
   416 tests ±0     416 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
1 251 runs  ±0  1 251 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 688a603. ± Comparison against base commit 688a603.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High High priority Subsystem: User-Facing Anything concerning user facing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants