BenedictChannn / pe

0 stars 0 forks source link

Extra space between command causes issue #4

Open BenedictChannn opened 10 months ago

BenedictChannn commented 10 months ago

image.png

If the user adds an extra space between the command i.e. "add income..." the entire input is recognised as an error. But this issue of extra spaces are quite common with CLI applications so would taking this into consideration be useful so that users do not have to key in the input again because of an accidental space? perhaps a trim function would help.

nus-se-script commented 10 months ago

Team's Response

The current behavior helps maintain a strict and predictable command syntax. This will be treat as a suggestion but not a bug.

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: As mentioned previously, this is a CLI application and entering additional spaces are going to be common, especially when users are going to type fast (hence the need for CLI application). As such, this should be taken into consideration when designing your application. The current behaviour does not make it more "strict". It is an implementation that is not robust enough, considering how your application will be used, and the input errors that are likely to happen. Extra spaces are going to be common and it should be considered so as to make your application more robust. Using a trim() function to remove the trailing spaces will not cause any negative behavior to your application, but rather help make it more robust.