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

made all commands non case sensitive #138

Merged

Conversation

Bandov
Copy link

@Bandov Bandov commented Apr 1, 2024

All commands now non case sensitive

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.07%. Comparing base (9ec9623) to head (8291188).
Report is 10 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #138      +/-   ##
============================================
- Coverage     75.46%   73.07%   -2.39%     
  Complexity      812      812              
============================================
  Files           116      117       +1     
  Lines          2617     2708      +91     
  Branches        327      334       +7     
============================================
+ Hits           1975     1979       +4     
- Misses          558      647      +89     
+ Partials         84       82       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Bandov
Copy link
Author

Bandov commented Apr 1, 2024

also added the functionality of shorthand. Each shorthand is just the first letter of each command. It means EditRelation == er and addAttribute == aa

Copy link

@Emberlynn-Loo Emberlynn-Loo left a comment

Choose a reason for hiding this comment

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

LGTM

@Bandov Bandov merged commit 7692001 into AY2324S2-CS2103T-T11-1:master Apr 1, 2024
4 of 5 checks passed
@DingBao-sys
Copy link

LGTM

Comment on lines +86 to 105
case FindCommand.COMMAND_WORD_SHORT:
return new FindCommandParser().parse(arguments);

case ListCommand.COMMAND_WORD:
case ListCommand.COMMAND_WORD_SHORT:
return new ListCommand();

case ExitCommand.COMMAND_WORD:
case ExitCommand.COMMAND_WORD_SHORT:
return new ExitCommand();

case HelpCommand.COMMAND_WORD:
case HelpCommand.COMMAND_WORD_SHORT:
return new HelpCommand();

case AddRelationshipCommand.COMMAND_WORD:
case AddRelationshipCommand.COMMAND_WORD_SHORT:
return new AddRelationshipCommandParser().parse(arguments.trim());

case DeleteRelationshipCommand.COMMAND_WORD:

Choose a reason for hiding this comment

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

I liked how you use case fall through pretty smart

Copy link
Author

Choose a reason for hiding this comment

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

thanks ik i am

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.

3 participants