Aryaman Bansal#684
Open
ary-ban wants to merge 60 commits into
Open
Conversation
In build.gradle, the dependencies on distZip and/or distTar causes
the shadowJar task to generate a second JAR file for which the
mainClass.set("seedu.duke.Duke") does not take effect.
Hence, this additional JAR file cannot be run.
For this product, there is no need to generate a second JAR file
to begin with.
Let's remove this dependency from the build.gradle to prevent the
shadowJar task from generating the extra JAR file.
estherkyx
reviewed
Sep 6, 2025
estherkyx
left a comment
There was a problem hiding this comment.
Overall LGTM! Keep up the good work 💯
Comment on lines
+10
to
+15
| System.out.println(" Hello! I'm Larry"); | ||
| System.out.println(" What can I do for you?"); | ||
| } | ||
|
|
||
| private static void exit() { | ||
| System.out.println(" Bye. Hope to see you again soon!"); |
There was a problem hiding this comment.
The strings printed here have leading spaces, was this intentional?
Comment on lines
+88
to
+92
| } else if (input.toLowerCase().startsWith("deadline")) { | ||
| String body = input.length() > 8 ? input.substring(8).trim() : ""; | ||
| int byIdx = body.toLowerCase().indexOf("/by"); | ||
| String desc = (byIdx == -1) ? body : body.substring(0, byIdx).trim(); | ||
| String by = (byIdx == -1) ? "" : body.substring(byIdx + 3).trim(); |
There was a problem hiding this comment.
Perhaps putting the parsing logic in another class or function would make your code neater 👍
Comment on lines
+27
to
+32
| private static void printList(List<Task> tasks) { | ||
| System.out.println("Here are the tasks in your list:"); | ||
| for (int i = 0; i < tasks.size(); i++) { | ||
| System.out.println((i + 1) + "." + tasks.get(i)); | ||
| } | ||
| } |
There was a problem hiding this comment.
I like how you extracted printList as a separate function from the main code, it makes your codebase much neater :)
Comment on lines
+60
to
+65
| int idx = parseIndex(input.substring(7)); | ||
| if (!isValidIndex(idx, tasks)) { | ||
| System.out.println("Invalid task index."); | ||
| continue; | ||
| } | ||
| Task t = tasks.get(idx - 1); |
There was a problem hiding this comment.
These lines are repeated in "mark" as well, maybe a separate function would make it less repetitive?
… by taking upstream version
Enable assertions for Gradle run and tests (-ea), and add asserts in TaskList for index bounds and non-null tasks, Parser for non-null inputs, and Storage for non-null results. Why: Catch programmer mistakes early while keeping user-facing validation unchanged. Improves reliability with minimal code."
Extract a helper to build 'task added' messages and reuse it in todo, deadline, and event flows. Why: Reduces duplication, improves readability, and keeps output identical so existing tests and text-UI checks remain valid.
Add a simple help command listing supported commands and their syntax. Available in GUI (string response via LarryCore) and CLI (Ui.showHelp). Why: Improves discoverability without affecting existing features/tests.
8ce6813 to
e60fff4
Compare
Normalize common short forms (t, dl, ev, ls, mk, um, del, f, h, q) to their canonical commands in Parser so users can type quicker. Help output updated to document aliases. Why: Improves usability with minimal risk—no storage/model changes and backward compatible with existing commands. # Conflicts: # data/larry.txt # src/main/java/larry/parser/Parser.java
Create an AI.md file under the docs folder to document AI usage in the project
Use relative path from docs/
This commit, as well as the preceding few commits, have been accompanied by full commit messages to add details to the changes made
Doc-only tweak so the branch has a visible diff for a PR.
Assertions: add short note in README about -ea
Doc-only change to create a PR for Week 5 requirement.
…MD), Javadocs, AI.md
UI advertises 'help (h)' but 'h' was not recognized.\n\nAdding the alias improves parity between UI hints and parsing behavior.
Replace assertions (disabled unless -ea) with Objects.requireNonNull in commandWord/argsOf to prevent NPEs reliably.
Return -1 for null input instead of throwing NPE when trim() is called.
Reduces duplication and clarifies intent in find() by centralizing case-insensitive substring matching.
Avoids potential NPEs when callers pass null; preserves behavior otherwise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Larry — your friendly CLI task buddy
Larry is a text-based task manager you run in the terminal. It’s quick to use, easy to learn, and
boringsurprisingly fun. ✨What Larry does
Capture tasks in three flavors: Todo, Deadline, Event
Organize with simple commands:
list,mark,unmark,deleteStay in flow with a lightweight, no-mouse workflow
Exit cleanly with
byeWhy people like it
Speed: No windows, no distractions, just type and go.
Clarity: Consistent output with
[T],[D],[E]type badges.Simplicity: Commands are short, memorable, and forgiving 🙂
Quick start
Try a quick session:
Commands at a glance
todo <description>— add a tododeadline <description> /by <when>— add a deadlineevent <description> /from <start> /to <end>— add an eventlist— show all tasksmark <index>/unmark <index>— toggle done statedelete <index>— remove a taskbye— quit LarryInline example:
deadline submit report /by 2025-10-01.Demo (UI output)
Sample code (syntax highlighting)
For reviewers / contributors
Focus on command parsing clarity and error messages.
Confirm index bounds checks (
mark 999,delete 0).Skim model classes (
Task,Todo,Deadline,Event,TaskType) for readability.Roadmap (task list)
-
-
-
-
# Larry — your friendly CLI task buddyPersistence to file
Command aliasing / shortcuts
GUI option (JavaFX)
Checkstyle config & formatting pass 😉
Larry is a text-based task manager you run in the terminal. It’s quick to use, easy to learn, and
boringsurprisingly fun. ✨What Larry does
list,mark,unmark,deletebyeWhy people like it
[T],[D],[E]type badges.Quick start
Try a quick session:
Commands at a glance
todo <description>— add a tododeadline <description> /by <when>— add a deadlineevent <description> /from <start> /to <end>— add an eventlist— show all tasksmark <index>/unmark <index>— toggle done statedelete <index>— remove a taskbye— quit LarryInline example:
deadline submit report /by 2025-10-01.Demo (UI output)
Sample code (syntax highlighting)
For reviewers / contributors
toString()with[T]/[D]/[E]badgesmark 999,delete 0).Task,Todo,Deadline,Event,TaskType) for readability.Roadmap (task list)