-
Notifications
You must be signed in to change notification settings - Fork 166
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
[W5.7][F10-2]Lim Fong Yuan #454
base: master
Are you sure you want to change the base?
Conversation
…wline and added indentation for Command.getMessageUsage().
…s that take in no parameters.
You are failing the unit tests. |
test/expected.txt
Outdated
@@ -29,10 +29,10 @@ | |||
|| Example: viewall 1 | |||
|| help: Shows program usage instructions. | |||
|| Parameters: none | |||
|| Example: help | |||
|| Example: help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the script uses a 'diff', whitespace might be causing the CI to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's strange, because both my expected and my actual output do not have any whitespace at the end of line 32.
I've made a clean clone of this branch to my com and ran runtests.bat, and it reports no difference as well.
I did change the formatting of the text files while I was working on this while I was troubleshooting why the identical-looking files are being reported as different. Maybe that's the issue instead?
+ "\n" + ViewAllCommand.MESSAGE_USAGE | ||
+ "\n" + HelpCommand.MESSAGE_USAGE | ||
+ "\n" + ExitCommand.MESSAGE_USAGE | ||
+ DeleteCommand.MESSAGE_USAGE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the new line? If you have added the "\n" in another commit, you should squash the commit to be together with this. It is unclear why you are removing new lines.
Good job, but maybe could add more JUnit and IO test cases :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job for attempting the LO. As mentioned by Wei Neng, you have to be mindful of trailing whitespaces. However, there will be a static code analysis tool (Checkstyle) that you will use for your AB4 to check coding style compliance.
* @return the MESSAGE_USAGE for a command. | ||
*/ | ||
protected static String getMessageUsage( | ||
String commandWord, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation for wrapped lines should be 8 spaces
Hi Fong Yuan, Commit titles should be less than 72 characters and have no full stops, which is why some of your commits got wrapped to the next line. |
Extract a Command.getMessageUsage() method and format the help command.