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

Add flags parser #77

Merged

Conversation

peironggg
Copy link
Collaborator

@peironggg peironggg commented Oct 5, 2020

Fixes #70
Fixes #78

@codecov-commenter
Copy link

Codecov Report

Merging #77 into master will decrease coverage by 0.51%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #77      +/-   ##
============================================
- Coverage     65.53%   65.01%   -0.52%     
  Complexity      406      406              
============================================
  Files            80       81       +1     
  Lines          1381     1392      +11     
  Branches        134      135       +1     
============================================
  Hits            905      905              
- Misses          443      454      +11     
  Partials         33       33              
Impacted Files Coverage Δ Complexity Δ
src/main/java/seedu/address/MainApp.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...ess/logic/commands/ViewMissionDeadlineCommand.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...in/java/seedu/address/logic/parser/ParserUtil.java 85.36% <0.00%> (-11.86%) 14.00 <0.00> (ø)
.../seedu/address/logic/parser/ViewCommandParser.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...rc/main/java/seedu/address/model/ModelManager.java 90.56% <0.00%> (ø) 23.00 <0.00> (ø)
src/main/java/seedu/address/model/flag/Flag.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0370ddb...22d89a5. Read the comment docs.

Copy link
Collaborator

@ngzhenteng ngzhenteng left a comment

Choose a reason for hiding this comment

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

Apart from the comment I made, LGTM! Thank you


import com.google.common.collect.ImmutableSet;

public class Flag {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we could add a javadoc comment as follows:
Represents the string consisting of a dash followed by an alphabet such as "-m" included in the user's command.

Copy link
Collaborator

@wilinetan wilinetan left a comment

Choose a reason for hiding this comment

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

other than the comment i made the rest looks good!

@@ -20,14 +21,16 @@ public ViewCommand parse(String args) throws ParseException {
String.format(MESSAGE_INVALID_COMMAND_FORMAT, ViewCommand.MESSAGE_USAGE));
}

Flag commandFlag = ParserUtil.parseFlag(trimmedArgs);

String[] nameKeywords = trimmedArgs.split("\\s+");
String viewCommandOption = nameKeywords[0];
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think can remove this line:
String viewCommandOption = nameKeywords[0];

@peironggg peironggg merged commit 0d415df into AY2021S1-CS2103T-W11-2:master Oct 5, 2020
@ngzhenteng ngzhenteng added this to the v1.2 milestone Oct 5, 2020
@peironggg peironggg deleted the feature/add-flags-parser branch November 8, 2020 06:53
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.

Fix newline at EOF in login.json after every startup Implement saving of missions to json file
4 participants