nus-cs2113-AY2223S1 / pe-dev-response

0 stars 0 forks source link

Invalid 'view-expense' command still runs #833

Open nus-pe-bot opened 1 year ago

nus-pe-bot commented 1 year ago

Screenshot 2022-11-11 at 4.36.11 PM.png

Typed a wrong syntax command, with a space between '-' and 'n'

view-expense - n work

instead of saying its an invalid command it returned all the expenses.


[original: nus-cs2113-AY2223S1/pe-interim#806] [original labels: severity.Low type.FunctionalityBug]

xzynos commented 1 year ago

Team's Response

Greetings yongjicode,

Thank you for your bug report. After careful evaluation of your bug report, the development team is rejecting this bug report due to the following reasons:

1) The parsing of commands is handled by the Apache Commons CLI library. This library allows for duplicate arguments as certain applications require the passing of multiple values for the same argument (E.g. Command -a arg1 -a arg2 -a arg3). In our case, the application takes in the first valid argument and the rest will be ignored.

2) The user guide clearly states that "The presence of invalid or extra arguments will be ignored by MoneyGoWhere." under the section "Understanding the Command Syntax".

image.png

Regards, xzynos

Duplicate status (if any):

Duplicate of #843