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

Enforce no arguments for single-word commands #281

Merged
merged 3 commits into from
Nov 5, 2020

Conversation

ianyong
Copy link
Member

@ianyong ianyong commented Nov 4, 2020

Changes:

  • Restrict the user from entering arguments for single-word commands.
    • clear
    • exit
    • help
    • list (including variants)
  • Update tests accordingly.
  • Minor spelling/grammar corrections.

Note that I did not end up using the parsers as it would result in a lot of repetitive code. In addition, using the parsers would mean that the error message that is shown cannot be customised to display the entered command, as there would be no way of disambiguating between the various list variants.

Fixes #280.

@ianyong ianyong added type.bug 🐛 Something isn't working priority.medium 🥈 Todo for current iteration labels Nov 4, 2020
@ianyong ianyong added this to the v1.4 milestone Nov 4, 2020
@ianyong ianyong requested a review from a team November 4, 2020 18:20
@ianyong ianyong added this to In progress in Fine$$e (General) via automation Nov 4, 2020
@codecov-io
Copy link

codecov-io commented Nov 5, 2020

Codecov Report

Merging #281 into master will increase coverage by 0.05%.
The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #281      +/-   ##
============================================
+ Coverage     71.17%   71.22%   +0.05%     
- Complexity      920      921       +1     
============================================
  Files           141      141              
  Lines          2859     2871      +12     
  Branches        337      338       +1     
============================================
+ Hits           2035     2045      +10     
- Misses          703      704       +1     
- Partials        121      122       +1     
Impacted Files Coverage Δ Complexity Δ
...s1_cs2103_w16_3/finesse/commons/core/Messages.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...ookmarkparsers/AddBookmarkIncomeCommandParser.java 93.75% <ø> (ø) 5.00 <0.00> (ø)
...rkparsers/ConvertBookmarkExpenseCommandParser.java 100.00% <ø> (ø) 4.00 <0.00> (ø)
...arkparsers/ConvertBookmarkIncomeCommandParser.java 100.00% <ø> (ø) 4.00 <0.00> (ø)
...arkparsers/DeleteBookmarkExpenseCommandParser.java 100.00% <ø> (ø) 2.00 <0.00> (ø)
...markparsers/DeleteBookmarkIncomeCommandParser.java 100.00% <ø> (ø) 2.00 <0.00> (ø)
...6_3/finesse/logic/parser/FinanceTrackerParser.java 93.24% <83.33%> (-1.92%) 43.00 <1.00> (+1.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 dbdc2fc...60c472d. Read the comment docs.

Copy link

@yongping827 yongping827 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@wltan wltan left a comment

Choose a reason for hiding this comment

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

LGTM!

@wltan wltan merged commit 7e106fb into master Nov 5, 2020
Fine$$e (General) automation moved this from In progress to Done Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.medium 🥈 Todo for current iteration type.bug 🐛 Something isn't working
Projects
Development

Successfully merging this pull request may close these issues.

Update behaviour for commands that do not take in any arguments
4 participants