From 4f1df3baac2f20f790dd55e64bb7c9d33eff197b Mon Sep 17 00:00:00 2001 From: lmtaek Date: Tue, 17 Sep 2019 10:18:26 +0800 Subject: [PATCH 1/7] Updated RecurringTasks to handle multiple types of recurrences through enumerators; should be able to handle daily, weekly, and monthly input. If a task is out of date, during recurringTaskUpdate the date will change until it comes after the current date. --- .../java/duke/command/RecurringCommand.java | 6 ++- src/main/java/duke/core/Parser.java | 11 ++--- src/main/java/duke/core/Storage.java | 25 +++++++++--- src/main/java/duke/task/Deadline.java | 2 +- src/main/java/duke/task/Event.java | 2 +- src/main/java/duke/task/Task.java | 40 ++++++++++++++++--- src/main/java/duke/task/Todo.java | 2 +- 7 files changed, 66 insertions(+), 22 deletions(-) diff --git a/src/main/java/duke/command/RecurringCommand.java b/src/main/java/duke/command/RecurringCommand.java index ca306367fb..e1ff42129b 100644 --- a/src/main/java/duke/command/RecurringCommand.java +++ b/src/main/java/duke/command/RecurringCommand.java @@ -14,10 +14,12 @@ public class RecurringCommand extends Command { * Used to identify the task being marked as recurring. */ private int taskIndex; + protected Task.RecurringFrequency frequency; - public RecurringCommand(int taskIndex) { + public RecurringCommand(int taskIndex, Task.RecurringFrequency frequency) { super(); this.taskIndex = taskIndex; + this.frequency = frequency; } /** @@ -46,7 +48,7 @@ public void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException Task recurringTask = tasks.getTask(taskIndex); if (recurringTask.getDateTime() != null) { if (!recurringTask.isTaskRecurring()) { - recurringTask.makeTaskRecurring(); + recurringTask.makeTaskRecurring(this.frequency); ui.makeRecurring(recurringTask); } recurringTask.recurringTaskTimeUpdate(); diff --git a/src/main/java/duke/core/Parser.java b/src/main/java/duke/core/Parser.java index aa1c3ace82..035ac7bf5b 100644 --- a/src/main/java/duke/core/Parser.java +++ b/src/main/java/duke/core/Parser.java @@ -1,10 +1,7 @@ package duke.core; import duke.command.*; -import duke.task.Deadline; -import duke.task.PeriodTask; -import duke.task.Event; -import duke.task.Todo; +import duke.task.*; import java.text.DateFormat; import java.text.ParseException; @@ -99,7 +96,11 @@ public static Command parse(String ss) throws DukeException { case "recurring": try { int index = Integer.parseInt(command[1]); - return new RecurringCommand(index); + if (ss.toLowerCase().contains("weekly")) { return new RecurringCommand(index, Task.RecurringFrequency.WEEKLY); } + else if (ss.toLowerCase().contains("monthly")) { return new RecurringCommand(index, Task.RecurringFrequency.MONTHLY); } + else if (ss.toLowerCase().contains("daily")) { return new RecurringCommand(index, Task.RecurringFrequency.DAILY);} + else { return new RecurringCommand(index, Task.RecurringFrequency.DAILY);} + } catch (Exception e) { throw new DukeException("Failed to make your task recurring." + e.getMessage()); } diff --git a/src/main/java/duke/core/Storage.java b/src/main/java/duke/core/Storage.java index 8fef581723..7bec034550 100644 --- a/src/main/java/duke/core/Storage.java +++ b/src/main/java/duke/core/Storage.java @@ -47,8 +47,8 @@ public ArrayList load() throws DukeException { if (newTask[1].equals("1")) { x.markAsDone(); } - if (newTask[3].equals("true")) { - x.makeTaskRecurring(); + if ((newTask[3] != null) && !(newTask[3].equals("ONCE"))) { + x.makeTaskRecurring(giveFrequency(newTask[3])); } tasks.add(x); } @@ -57,8 +57,8 @@ else if (newTask[0].equals("D")) { if (newTask[1].equals("1")) { t.markAsDone(); } - if (newTask[4].equals("true")) { - t.makeTaskRecurring(); + if ((newTask[4] != null) && !(newTask[4].equals("ONCE"))) { + t.makeTaskRecurring(giveFrequency(newTask[4])); } tasks.add(t); } @@ -67,8 +67,8 @@ else if (newTask[0].equals("E")) { if (newTask[1].equals("1")) { t.markAsDone(); } - if (newTask[4].equals("true")) { - t.makeTaskRecurring(); + if ((newTask[4] != null) && !(newTask[4].equals("ONCE"))) { + t.makeTaskRecurring(giveFrequency(newTask[4])); } tasks.add(t); } @@ -106,4 +106,17 @@ public void save(ArrayList task) throws DukeException { } } + private Task.RecurringFrequency giveFrequency(String string) { + switch (string) { + case "DAILY": + return Task.RecurringFrequency.DAILY; + case "WEEKLY": + return Task.RecurringFrequency.WEEKLY; + case "MONTHLY": + return Task.RecurringFrequency.MONTHLY; + default: + return Task.RecurringFrequency.ONCE; + } + } + } diff --git a/src/main/java/duke/task/Deadline.java b/src/main/java/duke/task/Deadline.java index efecd214eb..bdb758064a 100644 --- a/src/main/java/duke/task/Deadline.java +++ b/src/main/java/duke/task/Deadline.java @@ -52,7 +52,7 @@ public String writeTxt() { + " | " + this.by + " | " - + this.isRecurring; + + this.frequency; } } \ No newline at end of file diff --git a/src/main/java/duke/task/Event.java b/src/main/java/duke/task/Event.java index b1dca3e833..82e23cbc89 100644 --- a/src/main/java/duke/task/Event.java +++ b/src/main/java/duke/task/Event.java @@ -48,6 +48,6 @@ public String writeTxt() { + " | " + this.at + " | " - + this.isRecurring; + + this.frequency; } } \ No newline at end of file diff --git a/src/main/java/duke/task/Task.java b/src/main/java/duke/task/Task.java index e200931b0b..20c6b161be 100644 --- a/src/main/java/duke/task/Task.java +++ b/src/main/java/duke/task/Task.java @@ -17,23 +17,34 @@ * instantiated */ public abstract class Task { + /** * A String that represents the description of the task. */ protected String description; + /** * A boolean that represents the status of the task( 1 means done, 0 means not yet) */ protected boolean isDone; + /** * a localDateTime constructor to save the date and time */ protected LocalDateTime ld; + /** * A boolean that represents whether or not a task is recurring. True = recurring, False = non-recurring */ protected boolean isRecurring = false; + /** + * Enumerators meant to specify how frequently a task should appear. + * Default enumerator is 'ONCE'. + */ + public enum RecurringFrequency { DAILY, WEEKLY, MONTHLY, ONCE } + protected RecurringFrequency frequency = RecurringFrequency.ONCE; + /** * Initialises the minimum fields required to setup a Task. * @@ -79,7 +90,10 @@ public void markAsDone() { /** * Marks the task as recurring. */ - public void makeTaskRecurring() { isRecurring = true; } + public void makeTaskRecurring(RecurringFrequency frequency) { + isRecurring = true; + this.frequency = frequency; + } /** * Returns boolean stating whether task is recurring. @@ -95,11 +109,25 @@ public void recurringTaskTimeUpdate() { try { LocalDateTime currentTime = LocalDateTime.now(); if (this.ld.isBefore(currentTime)) { - Duration dayDifference = Duration.between(currentTime, this.ld); - if (Math.abs(dayDifference.toDays()) > 0 ) { - this.ld = ld.plusDays(Math.abs(dayDifference.toDays())); - - if (!this.isDone) { this.isDone = false; } + switch (this.frequency) { + case DAILY: + Duration dayDifference = Duration.between(currentTime, this.ld); + if (Math.abs(dayDifference.toDays()) > 0 ) { + this.ld = ld.plusDays(Math.abs(dayDifference.toDays())); + if (this.isDone) { this.isDone = false; } + } + case WEEKLY: + while (this.ld.isBefore(currentTime)) { + this.ld = ld.plusWeeks(1); + } + if (this.isDone) { this.isDone = false; } + case MONTHLY: + while (this.ld.isBefore(currentTime)) { + this.ld = ld.plusMonths(1); + } + if (this.isDone) { this.isDone = false; } + default: + System.out.println("I couldn't update your recurring events' times."); } } } catch (DateTimeParseException e) { diff --git a/src/main/java/duke/task/Todo.java b/src/main/java/duke/task/Todo.java index 12e6f88615..1750e0fd49 100644 --- a/src/main/java/duke/task/Todo.java +++ b/src/main/java/duke/task/Todo.java @@ -37,7 +37,7 @@ public String writeTxt() { + " | " + this.description + " | " - + this.isRecurring; + + this.frequency; } } \ No newline at end of file From f636a486863024f0be3e25fd65e3d1aadcde5bc0 Mon Sep 17 00:00:00 2001 From: lmtaek Date: Tue, 17 Sep 2019 18:10:24 +0800 Subject: [PATCH 2/7] Reformatting RecurringTask to mainly be located in a separate class, with some changes to the Task class itself. Data structure has changed for data.txt to specify the frequency of the recurring task when reading/saving information. --- data/duke.txt | 22 +++-- .../java/duke/command/RecurringCommand.java | 15 ++-- src/main/java/duke/core/Parser.java | 20 +++-- src/main/java/duke/core/Storage.java | 4 +- src/main/java/duke/core/Ui.java | 2 +- src/main/java/duke/task/Deadline.java | 6 +- src/main/java/duke/task/Event.java | 6 +- src/main/java/duke/task/RecurringTask.java | 86 +++++++++++++++++++ src/main/java/duke/task/Task.java | 65 +++++--------- src/main/java/duke/task/Todo.java | 6 +- src/test/java/duke/task/RecurringTest.java | 54 ++++++++++++ 11 files changed, 211 insertions(+), 75 deletions(-) create mode 100644 src/main/java/duke/task/RecurringTask.java create mode 100644 src/test/java/duke/task/RecurringTest.java diff --git a/data/duke.txt b/data/duke.txt index 02ebc979f7..4310aa12ea 100644 --- a/data/duke.txt +++ b/data/duke.txt @@ -1,12 +1,10 @@ -D | 1 | ssss | 16/09/2019 0200 | false -D | 1 | tttt | 16/09/2019 0500 | false -E | 1 | tasktest | 16/09/2019 1000 | false -D | 1 | read book | 27/09/2019 1800 | false -D | 1 | watch movie | 27/09/2019 1800 | false -D | 1 | adding | 27/09/2019 1900 | false -D | 1 | hello | 27/09/2019 2000 | false -D | 1 | readbook | 27/09/2019 2300 | false -D | 0 | watch tv | 27/09/2019 1700 | false -D | 0 | hello | 27/09/2019 1800 | false -P | 0 | abc | 27/07/1996 1530 | 27/07/2020 1530 -P | 0 | abc | 27/07/1996 1530 | 27/07/2020 1530 \ No newline at end of file +D | 1 | ssss | 16/09/2019 0200 | ONCE +D | 0 | tttt | 16/09/2019 0500 | DAILY +E | 0 | tasktest | 16/09/2019 1000 | DAILY +D | 1 | read book | 27/09/2019 1800 | DAILY +D | 1 | watch movie | 27/09/2019 1800 | ONCE +D | 1 | adding | 27/09/2019 1900 | DAILY +D | 0 | hello | 05/09/2019 2000 | DAILY +D | 1 | readbook | 27/09/2019 2300 | DAILY +D | 1 | watch tv | 27/09/2019 1700 | DAILY +D | 0 | hello | 27/09/2019 1800 | DAILY diff --git a/src/main/java/duke/command/RecurringCommand.java b/src/main/java/duke/command/RecurringCommand.java index e1ff42129b..0a6d3cd472 100644 --- a/src/main/java/duke/command/RecurringCommand.java +++ b/src/main/java/duke/command/RecurringCommand.java @@ -45,16 +45,15 @@ public RecurringCommand(int taskIndex, Task.RecurringFrequency frequency) { @Override public void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException { try { - Task recurringTask = tasks.getTask(taskIndex); - if (recurringTask.getDateTime() != null) { - if (!recurringTask.isTaskRecurring()) { - recurringTask.makeTaskRecurring(this.frequency); - ui.makeRecurring(recurringTask); + Task task = tasks.getTask(taskIndex); + if (task.getDateTime() != null) { + if (!task.isTaskRecurring()) { + task.makeTaskRecurring(this.frequency); + ui.makeRecurring(task); + } else { + System.out.println("This task is already marked as recurring!"); } - recurringTask.recurringTaskTimeUpdate(); storage.save(tasks.fullTaskList()); - } else { - recurringTask.updateLocalDateTime(LocalDateTime.now().toString()); } } catch (DukeException e) { throw new DukeException("I couldn't make the task recurring. " + e); diff --git a/src/main/java/duke/core/Parser.java b/src/main/java/duke/core/Parser.java index 035ac7bf5b..7168010521 100644 --- a/src/main/java/duke/core/Parser.java +++ b/src/main/java/duke/core/Parser.java @@ -95,12 +95,20 @@ public static Command parse(String ss) throws DukeException { } case "recurring": try { - int index = Integer.parseInt(command[1]); - if (ss.toLowerCase().contains("weekly")) { return new RecurringCommand(index, Task.RecurringFrequency.WEEKLY); } - else if (ss.toLowerCase().contains("monthly")) { return new RecurringCommand(index, Task.RecurringFrequency.MONTHLY); } - else if (ss.toLowerCase().contains("daily")) { return new RecurringCommand(index, Task.RecurringFrequency.DAILY);} - else { return new RecurringCommand(index, Task.RecurringFrequency.DAILY);} - + String[] parsedInput = command[1].split(" /"); + int index = Integer.parseInt(parsedInput[0]); + if (parsedInput[1] != null) { + parsedInput[1] = parsedInput[1].trim(); + if (parsedInput[1].toLowerCase().contains("weekly")) { + return new RecurringCommand(index, Task.RecurringFrequency.WEEKLY); + } else if (parsedInput[1].toLowerCase().contains("monthly")) { + return new RecurringCommand(index, Task.RecurringFrequency.MONTHLY); + } else if (parsedInput[1].toLowerCase().contains("daily")) { + return new RecurringCommand(index, Task.RecurringFrequency.DAILY); + } else { + return new RecurringCommand(index, Task.RecurringFrequency.DAILY); + } + } } catch (Exception e) { throw new DukeException("Failed to make your task recurring." + e.getMessage()); } diff --git a/src/main/java/duke/core/Storage.java b/src/main/java/duke/core/Storage.java index 7bec034550..a6911c7b4e 100644 --- a/src/main/java/duke/core/Storage.java +++ b/src/main/java/duke/core/Storage.java @@ -108,14 +108,12 @@ public void save(ArrayList task) throws DukeException { private Task.RecurringFrequency giveFrequency(String string) { switch (string) { - case "DAILY": - return Task.RecurringFrequency.DAILY; case "WEEKLY": return Task.RecurringFrequency.WEEKLY; case "MONTHLY": return Task.RecurringFrequency.MONTHLY; default: - return Task.RecurringFrequency.ONCE; + return Task.RecurringFrequency.DAILY; } } diff --git a/src/main/java/duke/core/Ui.java b/src/main/java/duke/core/Ui.java index 0b8bc681c7..229520dae9 100644 --- a/src/main/java/duke/core/Ui.java +++ b/src/main/java/duke/core/Ui.java @@ -193,7 +193,7 @@ public void showWelcome() { + "| |_| | |_| | < __/\n" + "|____/ \\__,_|_|\\_\\___|\n"; System.out.println("Hello from\n" + logo); - System.out.println("Hello! I'm Duke\nWhat can I do for you?"); + System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); } /** diff --git a/src/main/java/duke/task/Deadline.java b/src/main/java/duke/task/Deadline.java index bdb758064a..21e737563c 100644 --- a/src/main/java/duke/task/Deadline.java +++ b/src/main/java/duke/task/Deadline.java @@ -45,6 +45,10 @@ public String toString() { * @return A string in a specific format to be stored in a local file. */ public String writeTxt() { + String frequency = "ONCE"; + if (isTaskRecurring()) { + frequency = recurringTask.writeTxt(); + } return "D | " + (this.isDone ? "1" : "0") + " | " @@ -52,7 +56,7 @@ public String writeTxt() { + " | " + this.by + " | " - + this.frequency; + + frequency; } } \ No newline at end of file diff --git a/src/main/java/duke/task/Event.java b/src/main/java/duke/task/Event.java index 82e23cbc89..53d1178d05 100644 --- a/src/main/java/duke/task/Event.java +++ b/src/main/java/duke/task/Event.java @@ -41,6 +41,10 @@ public String toString() { * @return A string in a specific format to be stored in a local file. */ public String writeTxt() { + String frequency = "ONCE"; + if (isTaskRecurring()) { + frequency = recurringTask.writeTxt(); + } return "E | " + (this.isDone ? "1" : "0") + " | " @@ -48,6 +52,6 @@ public String writeTxt() { + " | " + this.at + " | " - + this.frequency; + + frequency; } } \ No newline at end of file diff --git a/src/main/java/duke/task/RecurringTask.java b/src/main/java/duke/task/RecurringTask.java new file mode 100644 index 0000000000..639b8c51c7 --- /dev/null +++ b/src/main/java/duke/task/RecurringTask.java @@ -0,0 +1,86 @@ +package duke.task; + +import java.time.Duration; +import java.time.LocalDateTime; +import java.time.format.DateTimeParseException; + +public class RecurringTask extends Task { + + public enum RecurringFrequency { DAILY, WEEKLY, MONTHLY}; + public enum TaskType { TODO, DEADLINE, EVENT} + + private Task task; + private RecurringFrequency frequency; + private TaskType taskType; + + public RecurringTask(Task task, RecurringFrequency frequency) { + super(task.description); + this.task = task; + if (task instanceof Todo) { this.taskType = TaskType.TODO; } + if (task instanceof Deadline) { this.taskType = TaskType.DEADLINE; } + if (task instanceof Event) { this.taskType = TaskType.EVENT; } + + this.frequency = frequency; + } + + public Task getTask() { return task; } + + public RecurringFrequency getFrequency() { return frequency; } + + /** + * When a task is recurring, method compares current time to listed date. + * If the task's date is outdated, then it will update to be for the next day. + */ + public void recurringTaskTimeUpdate() { + if (task.getDateTime() != null) { + try { + LocalDateTime currentTime = LocalDateTime.now(); + if (task.getDateTime().isBefore(currentTime)) { + + switch (this.frequency) { + case DAILY: + Duration dayDifference = Duration.between(currentTime, task.getDateTime()); + int totalDaysDifference = (int) Math.abs(dayDifference.toDays()); + if (totalDaysDifference > 0 ) { + task.updateLocalDateTime(task.getDateTime().plusDays(totalDaysDifference).toString()); + if (task.isDone) { task.isDone = false; } + } + case WEEKLY: + Duration weekDifference = Duration.between(currentTime, task.getDateTime()); + int totalWeeksDifference = (int) Math.abs(weekDifference.toDays()/7); + if (totalWeeksDifference > 0) { + task.updateLocalDateTime(task.getDateTime().plusWeeks(totalWeeksDifference).toString()); + } + if (task.isDone) { task.isDone = false; } + case MONTHLY: + Duration monthDifference = Duration.between(currentTime, task.getDateTime()); + long totalMonthsDifference = (int) Math.abs(monthDifference.toDays()/30); + if (totalMonthsDifference > 0) { + task.updateLocalDateTime(task.getDateTime().plusMonths(totalMonthsDifference).toString()); + } + if (task.isDone) { task.isDone = false; } + } + } + } catch (DateTimeParseException e) { + System.out.println("I couldn't update your recurring events' times."); + } + } + } + + public LocalDateTime getUpdatedTime() { + return ld; + } + + @Override + public String writeTxt() { + switch (frequency) { + case DAILY: + return "DAILY"; + case WEEKLY: + return "WEEKLY"; + case MONTHLY: + return "MONTHLY"; + } + return "ONCE"; + } +} diff --git a/src/main/java/duke/task/Task.java b/src/main/java/duke/task/Task.java index 20c6b161be..9201219a24 100644 --- a/src/main/java/duke/task/Task.java +++ b/src/main/java/duke/task/Task.java @@ -39,11 +39,14 @@ public abstract class Task { protected boolean isRecurring = false; /** - * Enumerators meant to specify how frequently a task should appear. - * Default enumerator is 'ONCE'. + * An enumerator meant to specify the frequency of a recurring task. */ - public enum RecurringFrequency { DAILY, WEEKLY, MONTHLY, ONCE } - protected RecurringFrequency frequency = RecurringFrequency.ONCE; + public enum RecurringFrequency { DAILY, WEEKLY, MONTHLY; } + + /** + * An extended class that retains information about a recurring task. + */ + protected RecurringTask recurringTask; /** * Initialises the minimum fields required to setup a Task. @@ -92,7 +95,19 @@ public void markAsDone() { */ public void makeTaskRecurring(RecurringFrequency frequency) { isRecurring = true; - this.frequency = frequency; + switch (frequency) { + case DAILY: + this.recurringTask = new RecurringTask(this, RecurringTask.RecurringFrequency.DAILY); + case WEEKLY: + this.recurringTask = new RecurringTask(this, RecurringTask.RecurringFrequency.WEEKLY); + case MONTHLY: + this.recurringTask = new RecurringTask(this, RecurringTask.RecurringFrequency.MONTHLY); + default: + this.recurringTask = new RecurringTask(this, RecurringTask.RecurringFrequency.DAILY); + } + if (this.recurringTask != null) { + this.recurringTask.recurringTaskTimeUpdate(); + } } /** @@ -100,42 +115,6 @@ public void makeTaskRecurring(RecurringFrequency frequency) { */ public boolean isTaskRecurring() { return isRecurring; } - /** - * When a task is recurring, method compares current time to listed date. - * If the task's date is outdated, then it will update to be for the next day. - */ - public void recurringTaskTimeUpdate() { - if ((ld != null) && this.isRecurring) { - try { - LocalDateTime currentTime = LocalDateTime.now(); - if (this.ld.isBefore(currentTime)) { - switch (this.frequency) { - case DAILY: - Duration dayDifference = Duration.between(currentTime, this.ld); - if (Math.abs(dayDifference.toDays()) > 0 ) { - this.ld = ld.plusDays(Math.abs(dayDifference.toDays())); - if (this.isDone) { this.isDone = false; } - } - case WEEKLY: - while (this.ld.isBefore(currentTime)) { - this.ld = ld.plusWeeks(1); - } - if (this.isDone) { this.isDone = false; } - case MONTHLY: - while (this.ld.isBefore(currentTime)) { - this.ld = ld.plusMonths(1); - } - if (this.isDone) { this.isDone = false; } - default: - System.out.println("I couldn't update your recurring events' times."); - } - } - } catch (DateTimeParseException e) { - System.out.println("I couldn't update your recurring events' times."); - } - } - } - /** * Returns a string with the status icon and the description of the task. * @@ -204,7 +183,9 @@ public void updateLocalDateTime(String time){ */ public LocalDateTime getDateTime() { - if (this.isTaskRecurring()) { this.recurringTaskTimeUpdate(); } + if (recurringTask != null) { + this.ld = recurringTask.getUpdatedTime(); + } return ld; } diff --git a/src/main/java/duke/task/Todo.java b/src/main/java/duke/task/Todo.java index 1750e0fd49..99adfb5aa2 100644 --- a/src/main/java/duke/task/Todo.java +++ b/src/main/java/duke/task/Todo.java @@ -32,12 +32,16 @@ public String toString() { * @return A string in a specific format to be stored in a local file. */ public String writeTxt() { + String frequency = "ONCE"; + if (isTaskRecurring()) { + frequency = recurringTask.writeTxt(); + } return "T | " + (this.isDone() ? "1" : "0") + " | " + this.description + " | " - + this.frequency; + + frequency; } } \ No newline at end of file diff --git a/src/test/java/duke/task/RecurringTest.java b/src/test/java/duke/task/RecurringTest.java new file mode 100644 index 0000000000..9ff1f7376c --- /dev/null +++ b/src/test/java/duke/task/RecurringTest.java @@ -0,0 +1,54 @@ +package duke.task; +import duke.command.RecurringCommand; +import duke.task.*; +import org.junit.jupiter.api.Test; + +import java.time.Duration; +import java.time.LocalDateTime; +import static org.junit.jupiter.api.Assertions.*; + +public class RecurringTest { + + private Task dummyToDo = new Todo("essay"); + private Task dummyDeadline = new Deadline("paper", "03/08/2018 1159"); + private Task dummyEvent = new Event("presentation", "15/09/2019 1000"); + + + @Test + public void recurringDailyDeadlineTest() { + LocalDateTime oldDateTime = dummyDeadline.getDateTime(); + dummyDeadline.makeTaskRecurring(Task.RecurringFrequency.DAILY); + assert(dummyDeadline.getDateTime().isAfter(oldDateTime)); + + Duration dayDifference = Duration.between(LocalDateTime.now(), dummyDeadline.getDateTime()); + long numberOfDaysDifference = Math.abs(dayDifference.toDays()); + assert(numberOfDaysDifference <= 1); + } + + @Test + public void recurringWeeklyEventTest() { + LocalDateTime oldDateTime = dummyEvent.getDateTime(); + dummyEvent.makeTaskRecurring(Task.RecurringFrequency.WEEKLY); + assert(dummyEvent.getDateTime().isAfter(oldDateTime)); + + Duration dayDifference = Duration.between(LocalDateTime.now(), dummyEvent.getDateTime()); + long numberOfDaysDifference = Math.abs(dayDifference.toDays()); + assert(numberOfDaysDifference <= 7); + } + + @Test public void recurringMonthlyDeadlineTest() { + LocalDateTime oldDateTime = dummyDeadline.getDateTime(); + dummyDeadline.makeTaskRecurring(Task.RecurringFrequency.MONTHLY); + assert(dummyDeadline.getDateTime().isAfter(oldDateTime)); + + Duration dayDifference = Duration.between(LocalDateTime.now(), dummyDeadline.getDateTime()); + long numberOfDaysDifference = Math.abs(dayDifference.toDays()); + assert(numberOfDaysDifference <= 31); + } + + @Test public void recurringTodoTest() { + dummyToDo.makeTaskRecurring(Task.RecurringFrequency.DAILY); + assertNotEquals(true, dummyToDo.isTaskRecurring()); + } + +} From c433e7b90111898f6d09f2789698f5997a62503b Mon Sep 17 00:00:00 2001 From: lmtaek Date: Tue, 17 Sep 2019 18:39:18 +0800 Subject: [PATCH 3/7] Preventing infinite loop via using the .getDateTime() method between Task and RecurringTask classes; RecurringTask class acts now more like additional support, using past LocalDateTime in order to calculate new one to provide for Task class. --- src/main/java/duke/task/RecurringTask.java | 35 ++++++++++------------ src/main/java/duke/task/Task.java | 4 +-- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/main/java/duke/task/RecurringTask.java b/src/main/java/duke/task/RecurringTask.java index 639b8c51c7..cb6e3b226c 100644 --- a/src/main/java/duke/task/RecurringTask.java +++ b/src/main/java/duke/task/RecurringTask.java @@ -4,59 +4,58 @@ import java.time.LocalDateTime; import java.time.format.DateTimeParseException; -public class RecurringTask extends Task { +public class RecurringTask { public enum RecurringFrequency { DAILY, WEEKLY, MONTHLY}; public enum TaskType { TODO, DEADLINE, EVENT} - private Task task; + private LocalDateTime lastRecordedTime; private RecurringFrequency frequency; private TaskType taskType; public RecurringTask(Task task, RecurringFrequency frequency) { - super(task.description); - this.task = task; if (task instanceof Todo) { this.taskType = TaskType.TODO; } if (task instanceof Deadline) { this.taskType = TaskType.DEADLINE; } if (task instanceof Event) { this.taskType = TaskType.EVENT; } + if (task.getDateTime() != null) { + lastRecordedTime = task.getDateTime(); + } this.frequency = frequency; } - public Task getTask() { return task; } - public RecurringFrequency getFrequency() { return frequency; } /** * When a task is recurring, method compares current time to listed date. * If the task's date is outdated, then it will update to be for the next day. */ - public void recurringTaskTimeUpdate() { - if (task.getDateTime() != null) { + public LocalDateTime recurringTaskTimeUpdate(Task task) { + if (lastRecordedTime != null) { try { LocalDateTime currentTime = LocalDateTime.now(); - if (task.getDateTime().isBefore(currentTime)) { + if (lastRecordedTime.isBefore(currentTime)) { switch (this.frequency) { case DAILY: - Duration dayDifference = Duration.between(currentTime, task.getDateTime()); + Duration dayDifference = Duration.between(currentTime, lastRecordedTime); int totalDaysDifference = (int) Math.abs(dayDifference.toDays()); if (totalDaysDifference > 0 ) { - task.updateLocalDateTime(task.getDateTime().plusDays(totalDaysDifference).toString()); + lastRecordedTime = lastRecordedTime.plusDays(totalDaysDifference); if (task.isDone) { task.isDone = false; } } case WEEKLY: - Duration weekDifference = Duration.between(currentTime, task.getDateTime()); + Duration weekDifference = Duration.between(currentTime, lastRecordedTime); int totalWeeksDifference = (int) Math.abs(weekDifference.toDays()/7); if (totalWeeksDifference > 0) { - task.updateLocalDateTime(task.getDateTime().plusWeeks(totalWeeksDifference).toString()); + lastRecordedTime = lastRecordedTime.plusWeeks(totalWeeksDifference); } if (task.isDone) { task.isDone = false; } case MONTHLY: - Duration monthDifference = Duration.between(currentTime, task.getDateTime()); + Duration monthDifference = Duration.between(currentTime, lastRecordedTime); long totalMonthsDifference = (int) Math.abs(monthDifference.toDays()/30); if (totalMonthsDifference > 0) { - task.updateLocalDateTime(task.getDateTime().plusMonths(totalMonthsDifference).toString()); + lastRecordedTime = lastRecordedTime.plusMonths(totalMonthsDifference); } if (task.isDone) { task.isDone = false; } } @@ -65,13 +64,9 @@ public void recurringTaskTimeUpdate() { System.out.println("I couldn't update your recurring events' times."); } } + return lastRecordedTime; } - public LocalDateTime getUpdatedTime() { - return ld; - } - - @Override public String writeTxt() { switch (frequency) { case DAILY: diff --git a/src/main/java/duke/task/Task.java b/src/main/java/duke/task/Task.java index 9201219a24..0436f31436 100644 --- a/src/main/java/duke/task/Task.java +++ b/src/main/java/duke/task/Task.java @@ -106,7 +106,7 @@ public void makeTaskRecurring(RecurringFrequency frequency) { this.recurringTask = new RecurringTask(this, RecurringTask.RecurringFrequency.DAILY); } if (this.recurringTask != null) { - this.recurringTask.recurringTaskTimeUpdate(); + this.recurringTask.recurringTaskTimeUpdate(this); } } @@ -184,7 +184,7 @@ public void updateLocalDateTime(String time){ public LocalDateTime getDateTime() { if (recurringTask != null) { - this.ld = recurringTask.getUpdatedTime(); + this.ld = recurringTask.recurringTaskTimeUpdate(this); } return ld; } From ff177f8fffd0fdccd2bb9d998b5f1ecf0e86ae08 Mon Sep 17 00:00:00 2001 From: lmtaek Date: Tue, 17 Sep 2019 18:40:47 +0800 Subject: [PATCH 4/7] New files for supporting Duke; mainly stylistic files. --- .../test/classes/duke.task.RecurringTest.html | 219 ++++++++++++++++++ build/reports/tests/test/css/base-style.css | 179 ++++++++++++++ build/reports/tests/test/css/style.css | 84 +++++++ build/reports/tests/test/index.html | 145 ++++++++++++ build/reports/tests/test/js/report.js | 194 ++++++++++++++++ .../tests/test/packages/duke.task.html | 115 +++++++++ .../test/TEST-duke.task.RecurringTest.xml | 107 +++++++++ build/test-results/test/binary/output.bin | 0 build/test-results/test/binary/output.bin.idx | Bin 0 -> 1 bytes build/test-results/test/binary/results.bin | Bin 0 -> 10097 bytes 10 files changed, 1043 insertions(+) create mode 100644 build/reports/tests/test/classes/duke.task.RecurringTest.html create mode 100644 build/reports/tests/test/css/base-style.css create mode 100644 build/reports/tests/test/css/style.css create mode 100644 build/reports/tests/test/index.html create mode 100644 build/reports/tests/test/js/report.js create mode 100644 build/reports/tests/test/packages/duke.task.html create mode 100644 build/test-results/test/TEST-duke.task.RecurringTest.xml create mode 100644 build/test-results/test/binary/output.bin create mode 100644 build/test-results/test/binary/output.bin.idx create mode 100644 build/test-results/test/binary/results.bin diff --git a/build/reports/tests/test/classes/duke.task.RecurringTest.html b/build/reports/tests/test/classes/duke.task.RecurringTest.html new file mode 100644 index 0000000000..fcb2112179 --- /dev/null +++ b/build/reports/tests/test/classes/duke.task.RecurringTest.html @@ -0,0 +1,219 @@ + + + + + +Test results - RecurringTest + + + + + +
+

RecurringTest

+ +
+ + + + + +
+
+ + + + + + + +
+
+
4
+

tests

+
+
+
+
1
+

failures

+
+
+
+
0
+

ignored

+
+
+
+
0.087s
+

duration

+
+
+
+
+
+
75%
+

successful

+
+
+
+
+ +
+

Failed tests

+
+ +

recurringTodoTest()

+ +
org.opentest4j.AssertionFailedError: expected: not equal but was: <true>
+	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:39)
+	at org.junit.jupiter.api.AssertNotEquals.failEqual(AssertNotEquals.java:276)
+	at org.junit.jupiter.api.AssertNotEquals.assertNotEquals(AssertNotEquals.java:265)
+	at org.junit.jupiter.api.AssertNotEquals.assertNotEquals(AssertNotEquals.java:260)
+	at org.junit.jupiter.api.Assertions.assertNotEquals(Assertions.java:2743)
+	at duke.task.RecurringTest.recurringTodoTest(RecurringTest.java:51)
+	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
+	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675)
+	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
+	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:125)
+	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:132)
+	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:124)
+	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:74)
+	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
+	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
+	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:104)
+	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:62)
+	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:43)
+	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:35)
+	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
+	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
+	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:202)
+	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:198)
+	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
+	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
+	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
+	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
+	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
+	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
+	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
+	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
+	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
+	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
+	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
+	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
+	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
+	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
+	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
+	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
+	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
+	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
+	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
+	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220)
+	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188)
+	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
+	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
+	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
+	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:102)
+	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:82)
+	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:78)
+	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
+	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
+	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
+	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
+	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
+	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
+	at com.sun.proxy.$Proxy2.stop(Unknown Source)
+	at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:132)
+	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
+	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
+	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
+	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:175)
+	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:157)
+	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
+	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
+	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
+	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
+	at java.base/java.lang.Thread.run(Thread.java:834)
+
+
+
+
+
+

Tests

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TestDurationResult
recurringDailyDeadlineTest()0.066spassed
recurringMonthlyDeadlineTest()0.002spassed
recurringTodoTest()0.013sfailed
recurringWeeklyEventTest()0.006spassed
+
+
+ +
+ + diff --git a/build/reports/tests/test/css/base-style.css b/build/reports/tests/test/css/base-style.css new file mode 100644 index 0000000000..4afa73e3dd --- /dev/null +++ b/build/reports/tests/test/css/base-style.css @@ -0,0 +1,179 @@ + +body { + margin: 0; + padding: 0; + font-family: sans-serif; + font-size: 12pt; +} + +body, a, a:visited { + color: #303030; +} + +#content { + padding-left: 50px; + padding-right: 50px; + padding-top: 30px; + padding-bottom: 30px; +} + +#content h1 { + font-size: 160%; + margin-bottom: 10px; +} + +#footer { + margin-top: 100px; + font-size: 80%; + white-space: nowrap; +} + +#footer, #footer a { + color: #a0a0a0; +} + +#line-wrapping-toggle { + vertical-align: middle; +} + +#label-for-line-wrapping-toggle { + vertical-align: middle; +} + +ul { + margin-left: 0; +} + +h1, h2, h3 { + white-space: nowrap; +} + +h2 { + font-size: 120%; +} + +ul.tabLinks { + padding-left: 0; + padding-top: 10px; + padding-bottom: 10px; + overflow: auto; + min-width: 800px; + width: auto !important; + width: 800px; +} + +ul.tabLinks li { + float: left; + height: 100%; + list-style: none; + padding-left: 10px; + padding-right: 10px; + padding-top: 5px; + padding-bottom: 5px; + margin-bottom: 0; + -moz-border-radius: 7px; + border-radius: 7px; + margin-right: 25px; + border: solid 1px #d4d4d4; + background-color: #f0f0f0; +} + +ul.tabLinks li:hover { + background-color: #fafafa; +} + +ul.tabLinks li.selected { + background-color: #c5f0f5; + border-color: #c5f0f5; +} + +ul.tabLinks a { + font-size: 120%; + display: block; + outline: none; + text-decoration: none; + margin: 0; + padding: 0; +} + +ul.tabLinks li h2 { + margin: 0; + padding: 0; +} + +div.tab { +} + +div.selected { + display: block; +} + +div.deselected { + display: none; +} + +div.tab table { + min-width: 350px; + width: auto !important; + width: 350px; + border-collapse: collapse; +} + +div.tab th, div.tab table { + border-bottom: solid #d0d0d0 1px; +} + +div.tab th { + text-align: left; + white-space: nowrap; + padding-left: 6em; +} + +div.tab th:first-child { + padding-left: 0; +} + +div.tab td { + white-space: nowrap; + padding-left: 6em; + padding-top: 5px; + padding-bottom: 5px; +} + +div.tab td:first-child { + padding-left: 0; +} + +div.tab td.numeric, div.tab th.numeric { + text-align: right; +} + +span.code { + display: inline-block; + margin-top: 0em; + margin-bottom: 1em; +} + +span.code pre { + font-size: 11pt; + padding-top: 10px; + padding-bottom: 10px; + padding-left: 10px; + padding-right: 10px; + margin: 0; + background-color: #f7f7f7; + border: solid 1px #d0d0d0; + min-width: 700px; + width: auto !important; + width: 700px; +} + +span.wrapped pre { + word-wrap: break-word; + white-space: pre-wrap; + word-break: break-all; +} + +label.hidden { + display: none; +} \ No newline at end of file diff --git a/build/reports/tests/test/css/style.css b/build/reports/tests/test/css/style.css new file mode 100644 index 0000000000..3dc4913e7a --- /dev/null +++ b/build/reports/tests/test/css/style.css @@ -0,0 +1,84 @@ + +#summary { + margin-top: 30px; + margin-bottom: 40px; +} + +#summary table { + border-collapse: collapse; +} + +#summary td { + vertical-align: top; +} + +.breadcrumbs, .breadcrumbs a { + color: #606060; +} + +.infoBox { + width: 110px; + padding-top: 15px; + padding-bottom: 15px; + text-align: center; +} + +.infoBox p { + margin: 0; +} + +.counter, .percent { + font-size: 120%; + font-weight: bold; + margin-bottom: 8px; +} + +#duration { + width: 125px; +} + +#successRate, .summaryGroup { + border: solid 2px #d0d0d0; + -moz-border-radius: 10px; + border-radius: 10px; +} + +#successRate { + width: 140px; + margin-left: 35px; +} + +#successRate .percent { + font-size: 180%; +} + +.success, .success a { + color: #008000; +} + +div.success, #successRate.success { + background-color: #bbd9bb; + border-color: #008000; +} + +.failures, .failures a { + color: #b60808; +} + +.skipped, .skipped a { + color: #c09853; +} + +div.failures, #successRate.failures { + background-color: #ecdada; + border-color: #b60808; +} + +ul.linkList { + padding-left: 0; +} + +ul.linkList li { + list-style: none; + margin-bottom: 5px; +} diff --git a/build/reports/tests/test/index.html b/build/reports/tests/test/index.html new file mode 100644 index 0000000000..791c760733 --- /dev/null +++ b/build/reports/tests/test/index.html @@ -0,0 +1,145 @@ + + + + + +Test results - Test Summary + + + + + +
+

Test Summary

+
+ + + + + +
+
+ + + + + + + +
+
+
4
+

tests

+
+
+
+
1
+

failures

+
+
+
+
0
+

ignored

+
+
+
+
0.087s
+

duration

+
+
+
+
+
+
75%
+

successful

+
+
+
+
+ +
+

Failed tests

+ +
+
+

Packages

+ + + + + + + + + + + + + + + + + + + + + +
PackageTestsFailuresIgnoredDurationSuccess rate
+duke.task +4100.087s75%
+
+
+

Classes

+ + + + + + + + + + + + + + + + + + + + + +
ClassTestsFailuresIgnoredDurationSuccess rate
+duke.task.RecurringTest +4100.087s75%
+
+
+ +
+ + diff --git a/build/reports/tests/test/js/report.js b/build/reports/tests/test/js/report.js new file mode 100644 index 0000000000..83bab4a19f --- /dev/null +++ b/build/reports/tests/test/js/report.js @@ -0,0 +1,194 @@ +(function (window, document) { + "use strict"; + + var tabs = {}; + + function changeElementClass(element, classValue) { + if (element.getAttribute("className")) { + element.setAttribute("className", classValue); + } else { + element.setAttribute("class", classValue); + } + } + + function getClassAttribute(element) { + if (element.getAttribute("className")) { + return element.getAttribute("className"); + } else { + return element.getAttribute("class"); + } + } + + function addClass(element, classValue) { + changeElementClass(element, getClassAttribute(element) + " " + classValue); + } + + function removeClass(element, classValue) { + changeElementClass(element, getClassAttribute(element).replace(classValue, "")); + } + + function initTabs() { + var container = document.getElementById("tabs"); + + tabs.tabs = findTabs(container); + tabs.titles = findTitles(tabs.tabs); + tabs.headers = findHeaders(container); + tabs.select = select; + tabs.deselectAll = deselectAll; + tabs.select(0); + + return true; + } + + function getCheckBox() { + return document.getElementById("line-wrapping-toggle"); + } + + function getLabelForCheckBox() { + return document.getElementById("label-for-line-wrapping-toggle"); + } + + function findCodeBlocks() { + var spans = document.getElementById("tabs").getElementsByTagName("span"); + var codeBlocks = []; + for (var i = 0; i < spans.length; ++i) { + if (spans[i].className.indexOf("code") >= 0) { + codeBlocks.push(spans[i]); + } + } + return codeBlocks; + } + + function forAllCodeBlocks(operation) { + var codeBlocks = findCodeBlocks(); + + for (var i = 0; i < codeBlocks.length; ++i) { + operation(codeBlocks[i], "wrapped"); + } + } + + function toggleLineWrapping() { + var checkBox = getCheckBox(); + + if (checkBox.checked) { + forAllCodeBlocks(addClass); + } else { + forAllCodeBlocks(removeClass); + } + } + + function initControls() { + if (findCodeBlocks().length > 0) { + var checkBox = getCheckBox(); + var label = getLabelForCheckBox(); + + checkBox.onclick = toggleLineWrapping; + checkBox.checked = false; + + removeClass(label, "hidden"); + } + } + + function switchTab() { + var id = this.id.substr(1); + + for (var i = 0; i < tabs.tabs.length; i++) { + if (tabs.tabs[i].id === id) { + tabs.select(i); + break; + } + } + + return false; + } + + function select(i) { + this.deselectAll(); + + changeElementClass(this.tabs[i], "tab selected"); + changeElementClass(this.headers[i], "selected"); + + while (this.headers[i].firstChild) { + this.headers[i].removeChild(this.headers[i].firstChild); + } + + var h2 = document.createElement("H2"); + + h2.appendChild(document.createTextNode(this.titles[i])); + this.headers[i].appendChild(h2); + } + + function deselectAll() { + for (var i = 0; i < this.tabs.length; i++) { + changeElementClass(this.tabs[i], "tab deselected"); + changeElementClass(this.headers[i], "deselected"); + + while (this.headers[i].firstChild) { + this.headers[i].removeChild(this.headers[i].firstChild); + } + + var a = document.createElement("A"); + + a.setAttribute("id", "ltab" + i); + a.setAttribute("href", "#tab" + i); + a.onclick = switchTab; + a.appendChild(document.createTextNode(this.titles[i])); + + this.headers[i].appendChild(a); + } + } + + function findTabs(container) { + return findChildElements(container, "DIV", "tab"); + } + + function findHeaders(container) { + var owner = findChildElements(container, "UL", "tabLinks"); + return findChildElements(owner[0], "LI", null); + } + + function findTitles(tabs) { + var titles = []; + + for (var i = 0; i < tabs.length; i++) { + var tab = tabs[i]; + var header = findChildElements(tab, "H2", null)[0]; + + header.parentNode.removeChild(header); + + if (header.innerText) { + titles.push(header.innerText); + } else { + titles.push(header.textContent); + } + } + + return titles; + } + + function findChildElements(container, name, targetClass) { + var elements = []; + var children = container.childNodes; + + for (var i = 0; i < children.length; i++) { + var child = children.item(i); + + if (child.nodeType === 1 && child.nodeName === name) { + if (targetClass && child.className.indexOf(targetClass) < 0) { + continue; + } + + elements.push(child); + } + } + + return elements; + } + + // Entry point. + + window.onload = function() { + initTabs(); + initControls(); + }; +} (window, window.document)); \ No newline at end of file diff --git a/build/reports/tests/test/packages/duke.task.html b/build/reports/tests/test/packages/duke.task.html new file mode 100644 index 0000000000..d1ec2fa86e --- /dev/null +++ b/build/reports/tests/test/packages/duke.task.html @@ -0,0 +1,115 @@ + + + + + +Test results - Package duke.task + + + + + +
+

Package duke.task

+ +
+ + + + + +
+
+ + + + + + + +
+
+
4
+

tests

+
+
+
+
1
+

failures

+
+
+
+
0
+

ignored

+
+
+
+
0.087s
+

duration

+
+
+
+
+
+
75%
+

successful

+
+
+
+
+ +
+

Failed tests

+ +
+
+

Classes

+ + + + + + + + + + + + + + + + + + + +
ClassTestsFailuresIgnoredDurationSuccess rate
+RecurringTest +4100.087s75%
+
+
+ +
+ + diff --git a/build/test-results/test/TEST-duke.task.RecurringTest.xml b/build/test-results/test/TEST-duke.task.RecurringTest.xml new file mode 100644 index 0000000000..028ac03a61 --- /dev/null +++ b/build/test-results/test/TEST-duke.task.RecurringTest.xml @@ -0,0 +1,107 @@ + + + + + + + org.opentest4j.AssertionFailedError: expected: not equal but was: <true> + at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:39) + at org.junit.jupiter.api.AssertNotEquals.failEqual(AssertNotEquals.java:276) + at org.junit.jupiter.api.AssertNotEquals.assertNotEquals(AssertNotEquals.java:265) + at org.junit.jupiter.api.AssertNotEquals.assertNotEquals(AssertNotEquals.java:260) + at org.junit.jupiter.api.Assertions.assertNotEquals(Assertions.java:2743) + at duke.task.RecurringTest.recurringTodoTest(RecurringTest.java:51) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:566) + at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675) + at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) + at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:125) + at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:132) + at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:124) + at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:74) + at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) + at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) + at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:104) + at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:62) + at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:43) + at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:35) + at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) + at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:202) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:198) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135) + at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) + at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) + at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) + at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) + at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) + at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220) + at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188) + at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181) + at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128) + at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:102) + at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:82) + at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:78) + at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:566) + at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) + at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) + at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32) + at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) + at com.sun.proxy.$Proxy2.stop(Unknown Source) + at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:132) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:566) + at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) + at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) + at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:175) + at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:157) + at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404) + at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) + at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) + at java.base/java.lang.Thread.run(Thread.java:834) + + + + + + diff --git a/build/test-results/test/binary/output.bin b/build/test-results/test/binary/output.bin new file mode 100644 index 0000000000..e69de29bb2 diff --git a/build/test-results/test/binary/output.bin.idx b/build/test-results/test/binary/output.bin.idx new file mode 100644 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d GIT binary patch literal 1 IcmZPo000310RR91 literal 0 HcmV?d00001 diff --git a/build/test-results/test/binary/results.bin b/build/test-results/test/binary/results.bin new file mode 100644 index 0000000000000000000000000000000000000000..57e302d182c2df42fa1f5630209304b5d106d32e GIT binary patch literal 10097 zcmeHNOK;mo5SEj)KnwKTs}4Lc7gmxjSuu(Lj;+8hlGKRp7(K4YwM2{Jvdg7y{eS{J z^;Dn*iXxZ(nE?G!oqduLpK_GA2VZQFyZg;!zZnj9_;~BlpI$P<4ny(Gd5hhIQa_xW z;h6olbk%BY&7c4K{@W*8e^Wi{5c$F45F;<}L(G@hPb&voFBHm8t;c^Elnab!!D4ic zLnbjQhFV`Lgt+zOcY|<7JR+AC-P`&`t@&l^A3`S%i9ix4yL092$1$eNC*e!51bZV& z3H`9uVA5V2-$vMF*xPG|gthU{2@2Zdgtc!_yx0Do(F8yL@W;lWzWxfaHrMMa34I2C zBcEaFpvX^cIA?wkJC|UIZS0cwuFy5w+kW=67Ud0LBW{U=5kD1HIwHV&yMuMmknpp? zD8U@`KLKW^9uxLIc8XOLL(1ZvZ3$HpE>50~Z*`z>aykO0-<2Tz!Wp9&e|P2093Kct zLlgkUWdO8t-XP{*R%jaVcS>*B^@ja=4)vkTUgaUGv7ZfVV%x*9OMRXa9iA;@1o2;o>41tcDJh+04eaz{Wr;AX*U2R@ z^Jr07EKZ_`Q07d1Oc8abz6+1_vneGvJp2zxz@P7+8x|=6+XX{1yQpfTlnYJlTs5%9 zyzWMvYb-1CzT`+P|C$)sOx7S*`Zn6NH^dWfHD~x9N49YjeIdID8F!tz9DjK*WMW_N~#2IPXPk;r@6 zojm6XZMs`(TH=A`+R{zIvY{$Z`GtCK;lD&3y-z7xyz=1{2WspQa;J8BM@B<`Cs*Az za`-8lV{kg0FdSvlDc|*xNS}nBVtVbnSiJ}A2Z7yujnHj7_dIE&*^-CK!>2em+$|m5 z6Z^`Id&mu&e#Ea&y@%ZJkQ+8tV6M-;huqM}XZMu3|4+FgeT`}4vE~o)I2q4Sb`J3+N&@yu z-_(`h>V1LQ>y?*t)v(J61Kzg_@w>zFqO2PK#%EJ==7YUc2DRfnE|yaDGG8sF(mCDX zC-Hf=m+{GjLeCA0_K&Yy2fTq7I}B=LIDMCWBEzm9&Y^2`q7K1%`Fs#SzvF}-Nb}Bu zrH&<_d^UqP9;p&ro|(n*@~B;dsb21~2PU6aYb4qxR;SZxrs^=05;m-<6EhMu(_(k6 zT|P~q4QRH^?5C7hHYh@P@X&|)tbHiOC=;!oA4iC}(@YcUP~XyHnI4oG6PuSkG1(|^ zwsBGld_W-O+{zU4iXabDqn**bVve*RA8dKo0H1Fc8hhVE5j09HeGN(O*!0$pPzd>u z>TY1sLYa@Ase>Qr13GacdUCf5#}W&AGHlMnSx9ce_9;oAwU$1x>vO^lq0rh9r_LAh zr-*wVpXyrJZaQK7>Y)dm?{Nz+>0U_2Nq6l5moiy5;Yg@icZR(m$5+r@hwJr?`&Ua1mxi-3`G9TBy41Q2h+8V0obbpC>|7;XW9^ip3nJy+}yUzW%vnbmU1a2p!WU%WS8_q>M3-*ok}x0>PBBlQW|udV+8 DzrCQ} literal 0 HcmV?d00001 From f067f892e0865adb1c1e11e6f5644068fedbc407 Mon Sep 17 00:00:00 2001 From: lmtaek Date: Tue, 17 Sep 2019 21:31:19 +0800 Subject: [PATCH 5/7] Wrapped up a few small issues with Storage saving information about Recurring Tasks. Cleaned up code in RecurringTask class to be more compact while accomplishing the same thing. --- data/duke.txt | 10 ++++--- src/main/java/duke/core/Storage.java | 4 ++- src/main/java/duke/task/Deadline.java | 2 +- src/main/java/duke/task/Event.java | 2 +- src/main/java/duke/task/RecurringTask.java | 32 +++++----------------- src/main/java/duke/task/Task.java | 9 ++++-- src/main/java/duke/task/Todo.java | 2 +- 7 files changed, 25 insertions(+), 36 deletions(-) diff --git a/data/duke.txt b/data/duke.txt index 96d60303a0..0a0e3316a6 100644 --- a/data/duke.txt +++ b/data/duke.txt @@ -1,13 +1,15 @@ E | 0 | fsahufias | 30/06/2020 0316 | ONCE -D | 0 | abc | 17/09/2019 0915 | DAILY +D | 0 | abc | 24/09/2019 0915 | DAILY P | 0 | abc | 27/07/1996 2130 | 27/06/2029 1630 -D | 0 | abc | 17/09/2019 1145 | DAILY +D | 0 | abc | 24/09/2019 1145 | DAILY T | 1 | abc | DAILY D | 0 | abc | 17/09/2019 2130 | ONCE E | 0 | werq | 17/09/2019 1500 | ONCE T | 0 | homework | ONCE -E | 0 | abc | 17/09/2019 1530 | DAILY +E | 0 | abc | 24/09/2019 1530 | DAILY P | 0 | abc | 27/08/2019 1630 | 29/11/2020 1630 P | 0 | abc | 27/08/2019 1630 | 29/11/2020 1630 P | 0 | abc | 27/08/2019 1630 | 29/11/2020 1630 -E | 0 | dog | 17/09/2019 0001 | DAILY +E | 1 | dog | 24/09/2019 0001 | MONTHLY +D | 0 | cat | 11/10/2019 0001 | DAILY +E | 0 | rabbit | 23/09/2019 0909 | WEEKLY diff --git a/src/main/java/duke/core/Storage.java b/src/main/java/duke/core/Storage.java index a395f8a87c..b8f5f4861d 100644 --- a/src/main/java/duke/core/Storage.java +++ b/src/main/java/duke/core/Storage.java @@ -114,12 +114,14 @@ public void save(ArrayList task) throws DukeException { private Task.RecurringFrequency giveFrequency(String string) { switch (string) { + case "DAILY": + return Task.RecurringFrequency.DAILY; case "WEEKLY": return Task.RecurringFrequency.WEEKLY; case "MONTHLY": return Task.RecurringFrequency.MONTHLY; default: - return Task.RecurringFrequency.DAILY; + return Task.RecurringFrequency.ONCE; } } diff --git a/src/main/java/duke/task/Deadline.java b/src/main/java/duke/task/Deadline.java index 4c32fb8545..dc9eff5372 100644 --- a/src/main/java/duke/task/Deadline.java +++ b/src/main/java/duke/task/Deadline.java @@ -66,7 +66,7 @@ public String toString() { public String writeTxt() { String frequency = "ONCE"; if (isTaskRecurring()) { - frequency = recurringTask.writeTxt(); + frequency = recurringTask.getFrequency().toString(); } return "D | " + (isDone() ? "1" : "0") diff --git a/src/main/java/duke/task/Event.java b/src/main/java/duke/task/Event.java index f3caf31489..32dee0c607 100644 --- a/src/main/java/duke/task/Event.java +++ b/src/main/java/duke/task/Event.java @@ -65,7 +65,7 @@ public String toString() { public String writeTxt() { String frequency = "ONCE"; if (isTaskRecurring()) { - frequency = recurringTask.writeTxt(); + frequency = recurringTask.getFrequency().toString(); } return "E | " + (isDone() ? "1" : "0") diff --git a/src/main/java/duke/task/RecurringTask.java b/src/main/java/duke/task/RecurringTask.java index 25f82e1a7c..0b6d2a092a 100644 --- a/src/main/java/duke/task/RecurringTask.java +++ b/src/main/java/duke/task/RecurringTask.java @@ -38,24 +38,18 @@ public LocalDateTime recurringTaskTimeUpdate(Task task) { switch (this.frequency) { case DAILY: - Duration dayDifference = Duration.between(currentTime, lastRecordedTime); - int totalDaysDifference = (int) Math.abs(dayDifference.toDays()); - if ((totalDaysDifference > 0 ) || task.isDone()) { - lastRecordedTime = lastRecordedTime.plusDays(totalDaysDifference); - if (task.isDone) { task.isDone = false; } + while (lastRecordedTime.isBefore(currentTime) || task.isDone()) { + lastRecordedTime = lastRecordedTime.plusDays(1); + if (task.isDone()) { task.isDone = false; } } case WEEKLY: - Duration weekDifference = Duration.between(currentTime, lastRecordedTime); - int totalWeeksDifference = (int) Math.abs(weekDifference.toDays()/7); - if ((totalWeeksDifference > 0) || task.isDone()) { - lastRecordedTime = lastRecordedTime.plusWeeks(totalWeeksDifference); + while (lastRecordedTime.isBefore(currentTime) || task.isDone()) { + lastRecordedTime = lastRecordedTime.plusWeeks(1); if (task.isDone) { task.isDone = false; } } case MONTHLY: - Duration monthDifference = Duration.between(currentTime, lastRecordedTime); - long totalMonthsDifference = (int) Math.abs(monthDifference.toDays()/30); - if ((totalMonthsDifference > 0) || task.isDone()) { - lastRecordedTime = lastRecordedTime.plusMonths(totalMonthsDifference); + while (lastRecordedTime.isBefore(currentTime) || task.isDone()) { + lastRecordedTime = lastRecordedTime.plusMonths(1); if (task.isDone) { task.isDone = false; } } } @@ -66,16 +60,4 @@ public LocalDateTime recurringTaskTimeUpdate(Task task) { } return lastRecordedTime; } - - public String writeTxt() { - switch (frequency) { - case DAILY: - return "DAILY"; - case WEEKLY: - return "WEEKLY"; - case MONTHLY: - return "MONTHLY"; - } - return "ONCE"; - } } diff --git a/src/main/java/duke/task/Task.java b/src/main/java/duke/task/Task.java index 8d76449213..02bdeea78f 100644 --- a/src/main/java/duke/task/Task.java +++ b/src/main/java/duke/task/Task.java @@ -42,7 +42,7 @@ public abstract class Task { /** * An enumerator meant to specify the frequency of a recurring task. */ - public enum RecurringFrequency { DAILY, WEEKLY, MONTHLY; } + public enum RecurringFrequency { DAILY, WEEKLY, MONTHLY, ONCE; } /** * An extended class that retains information about a recurring task. @@ -99,12 +99,15 @@ public void makeTaskRecurring(RecurringFrequency frequency) { switch (frequency) { case DAILY: this.recurringTask = new RecurringTask(this, RecurringTask.RecurringFrequency.DAILY); + break; case WEEKLY: this.recurringTask = new RecurringTask(this, RecurringTask.RecurringFrequency.WEEKLY); + break; case MONTHLY: this.recurringTask = new RecurringTask(this, RecurringTask.RecurringFrequency.MONTHLY); - default: - this.recurringTask = new RecurringTask(this, RecurringTask.RecurringFrequency.DAILY); + break; + case ONCE: + break; } if (this.recurringTask != null) { this.recurringTask.recurringTaskTimeUpdate(this); diff --git a/src/main/java/duke/task/Todo.java b/src/main/java/duke/task/Todo.java index 99adfb5aa2..ace6f025f6 100644 --- a/src/main/java/duke/task/Todo.java +++ b/src/main/java/duke/task/Todo.java @@ -34,7 +34,7 @@ public String toString() { public String writeTxt() { String frequency = "ONCE"; if (isTaskRecurring()) { - frequency = recurringTask.writeTxt(); + frequency = recurringTask.getFrequency().toString(); } return "T | " + (this.isDone() ? "1" : "0") From f241a283b39d2804b520623f366b463b213fa6ad Mon Sep 17 00:00:00 2001 From: lmtaek Date: Tue, 17 Sep 2019 21:45:00 +0800 Subject: [PATCH 6/7] Removed large amount of files to prevent conflicts with main team repo. --- build/reports/checkstyle/main.html | 958 ------------------ build/reports/checkstyle/main.xml | 258 ----- build/reports/checkstyle/test.html | 298 ------ build/reports/checkstyle/test.xml | 66 -- .../test/classes/duke.task.RecurringTest.html | 219 ---- build/reports/tests/test/css/base-style.css | 179 ---- build/reports/tests/test/css/style.css | 84 -- build/reports/tests/test/index.html | 145 --- build/reports/tests/test/js/report.js | 194 ---- .../tests/test/packages/duke.task.html | 115 --- .../test/TEST-duke.task.RecurringTest.xml | 107 -- build/test-results/test/binary/output.bin | 0 build/test-results/test/binary/output.bin.idx | Bin 1 -> 0 bytes build/test-results/test/binary/results.bin | Bin 10097 -> 0 bytes 14 files changed, 2623 deletions(-) delete mode 100644 build/reports/checkstyle/main.html delete mode 100644 build/reports/checkstyle/main.xml delete mode 100644 build/reports/checkstyle/test.html delete mode 100644 build/reports/checkstyle/test.xml delete mode 100644 build/reports/tests/test/classes/duke.task.RecurringTest.html delete mode 100644 build/reports/tests/test/css/base-style.css delete mode 100644 build/reports/tests/test/css/style.css delete mode 100644 build/reports/tests/test/index.html delete mode 100644 build/reports/tests/test/js/report.js delete mode 100644 build/reports/tests/test/packages/duke.task.html delete mode 100644 build/test-results/test/TEST-duke.task.RecurringTest.xml delete mode 100644 build/test-results/test/binary/output.bin delete mode 100644 build/test-results/test/binary/output.bin.idx delete mode 100644 build/test-results/test/binary/results.bin diff --git a/build/reports/checkstyle/main.html b/build/reports/checkstyle/main.html deleted file mode 100644 index 9410402449..0000000000 --- a/build/reports/checkstyle/main.html +++ /dev/null @@ -1,958 +0,0 @@ - - - - - - - - - - - - - - -
-

CheckStyle Audit

-
Designed for use with CheckStyle and Ant.
-
-

Summary

- - - - - - - -
FilesErrors
26203
-
-

Files

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameErrors
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\Parser.java94
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Task.java15
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\AddCommand.java13
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\DateTimeParser.java11
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\RescheduleCommand.java10
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\Ui.java7
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\RecurringCommand.java6
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\Storage.java6
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\Duke.java5
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\FixedDurationTask.java4
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\PeriodTask.java4
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\RemindCommand.java3
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\ViewCommand.java3
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Deadline.java3
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Event.java3
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Todo.java3
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\Reminder.java2
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\DeleteCommand.java2
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\DoneCommand.java2
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\ExitCommand.java2
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\FindCommand.java2
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\ListCommand.java2
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\Command.java1
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\FindFreeTimesCommand.java0
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\DukeException.java0
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\TaskList.java0
-
- -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\Duke.java

- - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
Using the '.*' form of import should be avoided - duke.core.*.5
WhitespaceAround: '{' is not preceded with whitespace.11
'CTOR_DEF' should be separated from previous statement.32
First sentence of Javadoc is missing an ending period.65
'METHOD_DEF' should be separated from previous statement.71
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\Reminder.java

- - - - - - - - - - -
Error DescriptionLine
'CTOR_DEF' should be separated from previous statement.38
'{' at column 21 should be on the previous line.54
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\AddCommand.java

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
First sentence of Javadoc is missing an ending period.24
First sentence of Javadoc is missing an ending period.40
Line continuation have incorrect indentation level, expected level should be 4.44
Line is longer than 120 characters (found 129).67
')' is preceded with whitespace.67
WhitespaceAround: '{' is not preceded with whitespace.67
',' is preceded with whitespace.75
';' is preceded with whitespace.77
')' is preceded with whitespace.81
WhitespaceAround: '}' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)94
WhitespaceAround: 'else' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)94
WhitespaceAround: 'else' is not preceded with whitespace.94
WhitespaceAround: '{' is not preceded with whitespace.94
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\Command.java

- - - - - - - -
Error DescriptionLine
Line continuation have incorrect indentation level, expected level should be 4.30
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\DeleteCommand.java

- - - - - - - - - - -
Error DescriptionLine
First sentence of Javadoc is missing an ending period.31
Line continuation have incorrect indentation level, expected level should be 4.35
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\DoneCommand.java

- - - - - - - - - - -
Error DescriptionLine
First sentence of Javadoc is missing an ending period.30
Line continuation have incorrect indentation level, expected level should be 4.34
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\ExitCommand.java

- - - - - - - - - - -
Error DescriptionLine
First sentence of Javadoc is missing an ending period.20
Line continuation have incorrect indentation level, expected level should be 4.24
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\FindCommand.java

- - - - - - - - - - -
Error DescriptionLine
First sentence of Javadoc is missing an ending period.29
Line continuation have incorrect indentation level, expected level should be 4.33
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\FindFreeTimesCommand.java

- - - - -
Error DescriptionLine
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\ListCommand.java

- - - - - - - - - - -
Error DescriptionLine
First sentence of Javadoc is missing an ending period.21
Line continuation have incorrect indentation level, expected level should be 4.25
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\RecurringCommand.java

- - - - - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
Using the '.*' form of import should be avoided - duke.task.*.7
First sentence of Javadoc is missing an ending period.23
Line continuation have incorrect indentation level, expected level should be 4.27
'{' at column 29 should have line break after.30
'}' at column 45 should be alone on a line.30
Empty line should be followed by <p> tag on the next line.34
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\RemindCommand.java

- - - - - - - - - - - - - -
Error DescriptionLine
'CTOR_DEF' should be separated from previous statement.21
First sentence of Javadoc is missing an ending period.26
Line continuation have incorrect indentation level, expected level should be 4.30
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\RescheduleCommand.java

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
Line is longer than 120 characters (found 127).23
WhitespaceAround: 'try' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)40
WhitespaceAround: '{' is not preceded with whitespace.40
WhitespaceAround: '{' is not preceded with whitespace.42
WhitespaceAround: '}' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)48
WhitespaceAround: 'catch' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)48
WhitespaceAround: 'catch' is not preceded with whitespace.48
WhitespaceAround: '{' is not preceded with whitespace.48
First sentence of Javadoc is missing an ending period.53
Line continuation have incorrect indentation level, expected level should be 4.57
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\ViewCommand.java

- - - - - - - - - - - - - -
Error DescriptionLine
'(' is preceded with whitespace.16
First sentence of Javadoc is missing an ending period.23
Line continuation have incorrect indentation level, expected level should be 4.27
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\DateTimeParser.java

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
Javadoc comment at column 19 has parse error. Missed HTML close tag 'code'. Sometimes it means that close tag missed for one of previous tags.9
Line is longer than 120 characters (found 128).33
Line is longer than 120 characters (found 128).34
Line is longer than 120 characters (found 128).35
Line is longer than 120 characters (found 128).36
WhitespaceAround: 'try' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)38
WhitespaceAround: '{' is not preceded with whitespace.38
WhitespaceAround: '}' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)50
WhitespaceAround: 'catch' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)50
WhitespaceAround: 'catch' is not preceded with whitespace.50
WhitespaceAround: '{' is not preceded with whitespace.50
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\DukeException.java

- - - - -
Error DescriptionLine
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\Parser.java

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
Using the '.*' form of import should be avoided - duke.command.*.3
Using the '.*' form of import should be avoided - duke.task.*.4
'case' child has incorrect indentation level 12, expected level should be 8.28
'block' child has incorrect indentation level 16, expected level should be 12.29
'case' child has incorrect indentation level 12, expected level should be 8.30
'try' has incorrect indentation level 16, expected level should be 12.31
'try' child has incorrect indentation level 20, expected level should be 16.32
'try' child has incorrect indentation level 20, expected level should be 16.33
'try rcurly' has incorrect indentation level 16, expected level should be 12.34
'catch' child has incorrect indentation level 20, expected level should be 16.35
'catch rcurly' has incorrect indentation level 16, expected level should be 12.36
'case' child has incorrect indentation level 12, expected level should be 8.37
'try' has incorrect indentation level 16, expected level should be 12.38
'try' child has incorrect indentation level 20, expected level should be 16.39
'try' child has incorrect indentation level 20, expected level should be 16.40
'try rcurly' has incorrect indentation level 16, expected level should be 12.41
'catch' child has incorrect indentation level 20, expected level should be 16.42
'catch rcurly' has incorrect indentation level 16, expected level should be 12.43
'case' child has incorrect indentation level 12, expected level should be 8.44
'try' has incorrect indentation level 16, expected level should be 12.45
'try' child has incorrect indentation level 20, expected level should be 16.46
'try' child has incorrect indentation level 20, expected level should be 16.47
'try rcurly' has incorrect indentation level 16, expected level should be 12.48
'catch' child has incorrect indentation level 20, expected level should be 16.49
'catch rcurly' has incorrect indentation level 16, expected level should be 12.50
'case' child has incorrect indentation level 12, expected level should be 8.51
'try' has incorrect indentation level 16, expected level should be 12.52
'try' child has incorrect indentation level 20, expected level should be 16.53
'try' child has incorrect indentation level 20, expected level should be 16.54
'try' child has incorrect indentation level 20, expected level should be 16.55
'try rcurly' has incorrect indentation level 16, expected level should be 12.56
'}' at column 17 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).56
'catch' has incorrect indentation level 17, expected level should be 12.57
'catch' child has incorrect indentation level 20, expected level should be 16.58
'catch rcurly' has incorrect indentation level 17, expected level should be 12.59
'case' child has incorrect indentation level 12, expected level should be 8.60
'try' has incorrect indentation level 16, expected level should be 12.61
'try' child has incorrect indentation level 20, expected level should be 16.62
'try' child has incorrect indentation level 20, expected level should be 16.63
'try' child has incorrect indentation level 20, expected level should be 16.64
'try rcurly' has incorrect indentation level 16, expected level should be 12.65
'catch' child has incorrect indentation level 20, expected level should be 16.66
'catch rcurly' has incorrect indentation level 16, expected level should be 12.67
'case' child has incorrect indentation level 12, expected level should be 8.68
'try' has incorrect indentation level 16, expected level should be 12.69
'try' child has incorrect indentation level 20, expected level should be 16.70
'try' child has incorrect indentation level 20, expected level should be 16.71
'try' child has incorrect indentation level 20, expected level should be 16.72
'try rcurly' has incorrect indentation level 16, expected level should be 12.73
'catch' child has incorrect indentation level 20, expected level should be 16.74
'catch rcurly' has incorrect indentation level 16, expected level should be 12.75
'case' child has incorrect indentation level 12, expected level should be 8.76
'try' has incorrect indentation level 16, expected level should be 12.77
'try' child has incorrect indentation level 20, expected level should be 16.78
'try' child has incorrect indentation level 20, expected level should be 16.79
'try' child has incorrect indentation level 20, expected level should be 16.80
'try' child has incorrect indentation level 20, expected level should be 16.81
'try rcurly' has incorrect indentation level 16, expected level should be 12.82
WhitespaceAround: '}' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)82
WhitespaceAround: 'catch' is not preceded with whitespace.82
'catch' child has incorrect indentation level 20, expected level should be 16.83
Line is longer than 120 characters (found 181).83
'catch rcurly' has incorrect indentation level 16, expected level should be 12.85
'case' child has incorrect indentation level 12, expected level should be 8.86
'block' child has incorrect indentation level 16, expected level should be 12.87
'case' child has incorrect indentation level 12, expected level should be 8.88
'try' has incorrect indentation level 16, expected level should be 12.89
'try' child has incorrect indentation level 20, expected level should be 16.90
'try' child has incorrect indentation level 20, expected level should be 16.91
'try rcurly' has incorrect indentation level 16, expected level should be 12.92
'catch' child has incorrect indentation level 20, expected level should be 16.93
Line is longer than 120 characters (found 156).93
'catch rcurly' has incorrect indentation level 16, expected level should be 12.94
'case' child has incorrect indentation level 12, expected level should be 8.95
'try' has incorrect indentation level 16, expected level should be 12.96
'try' child has incorrect indentation level 20, expected level should be 16.97
'try' child has incorrect indentation level 20, expected level should be 16.98
'try' child has incorrect indentation level 20, expected level should be 16.99
'try' child has incorrect indentation level 20, expected level should be 16.100
'try rcurly' has incorrect indentation level 16, expected level should be 12.102
'catch' child has incorrect indentation level 20, expected level should be 16.103
'catch rcurly' has incorrect indentation level 16, expected level should be 12.104
'case' child has incorrect indentation level 12, expected level should be 8.105
Fall through from previous branch of the switch statement.105
'try' has incorrect indentation level 16, expected level should be 12.106
'try' child has incorrect indentation level 20, expected level should be 16.107
'try' child has incorrect indentation level 20, expected level should be 16.108
'try rcurly' has incorrect indentation level 16, expected level should be 12.109
'catch' child has incorrect indentation level 20, expected level should be 16.110
'catch rcurly' has incorrect indentation level 16, expected level should be 12.111
'case' child has incorrect indentation level 12, expected level should be 8.112
'block' child has incorrect indentation level 16, expected level should be 12.113
'case' child has incorrect indentation level 12, expected level should be 8.114
'block' child has incorrect indentation level 16, expected level should be 12.115
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\Storage.java

- - - - - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
Using the '.*' form of import should be avoided - duke.task.*.3
'}' at column 17 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).54
'}' at column 17 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).64
'}' at column 17 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).74
WhitespaceAround: '}' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)82
WhitespaceAround: 'else' is not preceded with whitespace.82
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\TaskList.java

- - - - -
Error DescriptionLine
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\Ui.java

- - - - - - - - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
First sentence of Javadoc is missing an ending period.10
Unused Javadoc tag.104
'(' is preceded with whitespace.106
Comment has incorrect indentation level 0, expected is 8, indentation should be the same level as line 114.116
'(' is preceded with whitespace.141
',' is preceded with whitespace.141
Missing a Javadoc comment.159
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Deadline.java

- - - - - - - - - - - - - -
Error DescriptionLine
First sentence of Javadoc is missing an ending period.34
Line continuation have incorrect indentation level, expected level should be 4.38
First sentence of Javadoc is missing an ending period.45
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Event.java

- - - - - - - - - - - - - -
Error DescriptionLine
First sentence of Javadoc is missing an ending period.32
Line continuation have incorrect indentation level, expected level should be 4.36
First sentence of Javadoc is missing an ending period.43
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\FixedDurationTask.java

- - - - - - - - - - - - - - - - -
Error DescriptionLine
First sentence of Javadoc is missing an ending period.4
Summary javadoc is missing.21
Line continuation have incorrect indentation level, expected level should be 4.24
First sentence of Javadoc is missing an ending period.31
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\PeriodTask.java

- - - - - - - - - - - - - - - - -
Error DescriptionLine
Unused @param tag for 'startTime'.26
First sentence of Javadoc is missing an ending period.37
Line continuation have incorrect indentation level, expected level should be 4.41
First sentence of Javadoc is missing an ending period.50
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Task.java

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
First sentence of Javadoc is missing an ending period.25
First sentence of Javadoc is missing an ending period.29
First sentence of Javadoc is missing an ending period.57
First sentence of Javadoc is missing an ending period.66
'{' at column 37 should have line break after.83
'}' at column 59 should be alone on a line.83
'{' at column 38 should have line break after.88
'}' at column 60 should be alone on a line.88
')' is preceded with whitespace.100
'{' at column 43 should have line break after.103
Line continuation have incorrect indentation level, expected level should be 4.125
Comment has incorrect indentation level 0, expected is 4, indentation should be the same level as line 164.158
Javadoc comment at column 19 has parse error. Missed HTML close tag 'code'. Sometimes it means that close tag missed for one of previous tags.161
'{' at column 5 should be on the previous line.174
'{' at column 37 should have line break after.175
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Todo.java

- - - - - - - - - - - - - -
Error DescriptionLine
First sentence of Javadoc is missing an ending period.18
Line continuation have incorrect indentation level, expected level should be 4.22
First sentence of Javadoc is missing an ending period.29
- Back to top -
- - diff --git a/build/reports/checkstyle/main.xml b/build/reports/checkstyle/main.xml deleted file mode 100644 index 777ddd1884..0000000000 --- a/build/reports/checkstyle/main.xml +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/reports/checkstyle/test.html b/build/reports/checkstyle/test.html deleted file mode 100644 index 10e2dd1b81..0000000000 --- a/build/reports/checkstyle/test.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - - - - - -
-

CheckStyle Audit

-
Designed for use with CheckStyle and Ant.
-
-

Summary

- - - - - - - -
FilesErrors
553
-
-

Files

- - - - - - - - - - - - - - - - - - - -
NameErrors
C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\DeadlineTest.java15
C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\EventTest.java15
C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\TodoTest.java10
C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\core\ParserTest.java7
C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\PeriodTaskTest.java6
-
- -

File C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\core\ParserTest.java

- - - - - - - - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
Using the '.*' form of import should be avoided - duke.command.*.3
Distance between variable 'c4' declaration and its first usage is 4, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).18
Distance between variable 'c5' declaration and its first usage is 5, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).19
Distance between variable 'c6' declaration and its first usage is 6, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).20
Distance between variable 'c7' declaration and its first usage is 7, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).21
Distance between variable 'c8' declaration and its first usage is 8, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).22
Distance between variable 'c9' declaration and its first usage is 9, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).23
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\DeadlineTest.java

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
Using the '.*' form of import should be avoided - org.junit.jupiter.api.Assertions.*.6
Line is longer than 120 characters (found 163).16
Unicode escape(s) usage should be avoided.16
'(' is followed by whitespace.16
Line is longer than 120 characters (found 173).24
'(' is followed by whitespace.24
Line is longer than 120 characters (found 145).50
Unicode escape(s) usage should be avoided.50
'(' is followed by whitespace.50
Line is longer than 120 characters (found 134).51
'(' is followed by whitespace.51
Line is longer than 120 characters (found 146).56
Unicode escape(s) usage should be avoided.56
Line is longer than 120 characters (found 126).57
'(' is followed by whitespace.57
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\EventTest.java

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
Using the '.*' form of import should be avoided - org.junit.jupiter.api.Assertions.*.7
Method name 'EventStringTest' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9_]*$'.15
Line is longer than 120 characters (found 168).16
Unicode escape(s) usage should be avoided.16
Line is longer than 120 characters (found 154).24
'(' is followed by whitespace.24
Line is longer than 120 characters (found 139).50
Unicode escape(s) usage should be avoided.50
'(' is followed by whitespace.50
Line is longer than 120 characters (found 128).51
'(' is followed by whitespace.51
Line is longer than 120 characters (found 137).56
Unicode escape(s) usage should be avoided.56
Line is longer than 120 characters (found 128).57
'(' is followed by whitespace.57
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\PeriodTaskTest.java

- - - - - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
Using the '.*' form of import should be avoided - org.junit.jupiter.api.Assertions.*.6
Method name 'PeriodTaskStringTest' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9_]*$'.14
Line is longer than 120 characters (found 229).15
Unicode escape(s) usage should be avoided.15
Line is longer than 120 characters (found 208).23
'(' is followed by whitespace.23
- Back to top -

File C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\TodoTest.java

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Error DescriptionLine
Using the '.*' form of import should be avoided - org.junit.jupiter.api.Assertions.*.6
WhitespaceAround: '{' is not preceded with whitespace.15
Unicode escape(s) usage should be avoided.16
Line is longer than 120 characters (found 124).24
'(' is followed by whitespace.24
Unicode escape(s) usage should be avoided.50
'(' is followed by whitespace.50
'(' is followed by whitespace.51
Unicode escape(s) usage should be avoided.56
'(' is followed by whitespace.57
- Back to top -
- - diff --git a/build/reports/checkstyle/test.xml b/build/reports/checkstyle/test.xml deleted file mode 100644 index ebc36f73b5..0000000000 --- a/build/reports/checkstyle/test.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/reports/tests/test/classes/duke.task.RecurringTest.html b/build/reports/tests/test/classes/duke.task.RecurringTest.html deleted file mode 100644 index fcb2112179..0000000000 --- a/build/reports/tests/test/classes/duke.task.RecurringTest.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - -Test results - RecurringTest - - - - - -
-

RecurringTest

- -
- - - - - -
-
- - - - - - - -
-
-
4
-

tests

-
-
-
-
1
-

failures

-
-
-
-
0
-

ignored

-
-
-
-
0.087s
-

duration

-
-
-
-
-
-
75%
-

successful

-
-
-
-
- -
-

Failed tests

-
- -

recurringTodoTest()

- -
org.opentest4j.AssertionFailedError: expected: not equal but was: <true>
-	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:39)
-	at org.junit.jupiter.api.AssertNotEquals.failEqual(AssertNotEquals.java:276)
-	at org.junit.jupiter.api.AssertNotEquals.assertNotEquals(AssertNotEquals.java:265)
-	at org.junit.jupiter.api.AssertNotEquals.assertNotEquals(AssertNotEquals.java:260)
-	at org.junit.jupiter.api.Assertions.assertNotEquals(Assertions.java:2743)
-	at duke.task.RecurringTest.recurringTodoTest(RecurringTest.java:51)
-	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
-	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
-	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675)
-	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
-	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:125)
-	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:132)
-	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:124)
-	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:74)
-	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
-	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
-	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:104)
-	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:62)
-	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:43)
-	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:35)
-	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
-	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
-	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:202)
-	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
-	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:198)
-	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
-	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
-	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
-	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
-	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
-	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
-	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
-	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
-	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
-	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
-	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
-	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
-	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
-	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
-	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
-	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
-	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
-	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
-	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
-	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220)
-	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188)
-	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
-	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
-	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
-	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:102)
-	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:82)
-	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:78)
-	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
-	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
-	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
-	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
-	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
-	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
-	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
-	at com.sun.proxy.$Proxy2.stop(Unknown Source)
-	at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:132)
-	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
-	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
-	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
-	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
-	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:175)
-	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:157)
-	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
-	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
-	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
-	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
-	at java.base/java.lang.Thread.run(Thread.java:834)
-
-
-
-
-
-

Tests

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TestDurationResult
recurringDailyDeadlineTest()0.066spassed
recurringMonthlyDeadlineTest()0.002spassed
recurringTodoTest()0.013sfailed
recurringWeeklyEventTest()0.006spassed
-
-
- -
- - diff --git a/build/reports/tests/test/css/base-style.css b/build/reports/tests/test/css/base-style.css deleted file mode 100644 index 4afa73e3dd..0000000000 --- a/build/reports/tests/test/css/base-style.css +++ /dev/null @@ -1,179 +0,0 @@ - -body { - margin: 0; - padding: 0; - font-family: sans-serif; - font-size: 12pt; -} - -body, a, a:visited { - color: #303030; -} - -#content { - padding-left: 50px; - padding-right: 50px; - padding-top: 30px; - padding-bottom: 30px; -} - -#content h1 { - font-size: 160%; - margin-bottom: 10px; -} - -#footer { - margin-top: 100px; - font-size: 80%; - white-space: nowrap; -} - -#footer, #footer a { - color: #a0a0a0; -} - -#line-wrapping-toggle { - vertical-align: middle; -} - -#label-for-line-wrapping-toggle { - vertical-align: middle; -} - -ul { - margin-left: 0; -} - -h1, h2, h3 { - white-space: nowrap; -} - -h2 { - font-size: 120%; -} - -ul.tabLinks { - padding-left: 0; - padding-top: 10px; - padding-bottom: 10px; - overflow: auto; - min-width: 800px; - width: auto !important; - width: 800px; -} - -ul.tabLinks li { - float: left; - height: 100%; - list-style: none; - padding-left: 10px; - padding-right: 10px; - padding-top: 5px; - padding-bottom: 5px; - margin-bottom: 0; - -moz-border-radius: 7px; - border-radius: 7px; - margin-right: 25px; - border: solid 1px #d4d4d4; - background-color: #f0f0f0; -} - -ul.tabLinks li:hover { - background-color: #fafafa; -} - -ul.tabLinks li.selected { - background-color: #c5f0f5; - border-color: #c5f0f5; -} - -ul.tabLinks a { - font-size: 120%; - display: block; - outline: none; - text-decoration: none; - margin: 0; - padding: 0; -} - -ul.tabLinks li h2 { - margin: 0; - padding: 0; -} - -div.tab { -} - -div.selected { - display: block; -} - -div.deselected { - display: none; -} - -div.tab table { - min-width: 350px; - width: auto !important; - width: 350px; - border-collapse: collapse; -} - -div.tab th, div.tab table { - border-bottom: solid #d0d0d0 1px; -} - -div.tab th { - text-align: left; - white-space: nowrap; - padding-left: 6em; -} - -div.tab th:first-child { - padding-left: 0; -} - -div.tab td { - white-space: nowrap; - padding-left: 6em; - padding-top: 5px; - padding-bottom: 5px; -} - -div.tab td:first-child { - padding-left: 0; -} - -div.tab td.numeric, div.tab th.numeric { - text-align: right; -} - -span.code { - display: inline-block; - margin-top: 0em; - margin-bottom: 1em; -} - -span.code pre { - font-size: 11pt; - padding-top: 10px; - padding-bottom: 10px; - padding-left: 10px; - padding-right: 10px; - margin: 0; - background-color: #f7f7f7; - border: solid 1px #d0d0d0; - min-width: 700px; - width: auto !important; - width: 700px; -} - -span.wrapped pre { - word-wrap: break-word; - white-space: pre-wrap; - word-break: break-all; -} - -label.hidden { - display: none; -} \ No newline at end of file diff --git a/build/reports/tests/test/css/style.css b/build/reports/tests/test/css/style.css deleted file mode 100644 index 3dc4913e7a..0000000000 --- a/build/reports/tests/test/css/style.css +++ /dev/null @@ -1,84 +0,0 @@ - -#summary { - margin-top: 30px; - margin-bottom: 40px; -} - -#summary table { - border-collapse: collapse; -} - -#summary td { - vertical-align: top; -} - -.breadcrumbs, .breadcrumbs a { - color: #606060; -} - -.infoBox { - width: 110px; - padding-top: 15px; - padding-bottom: 15px; - text-align: center; -} - -.infoBox p { - margin: 0; -} - -.counter, .percent { - font-size: 120%; - font-weight: bold; - margin-bottom: 8px; -} - -#duration { - width: 125px; -} - -#successRate, .summaryGroup { - border: solid 2px #d0d0d0; - -moz-border-radius: 10px; - border-radius: 10px; -} - -#successRate { - width: 140px; - margin-left: 35px; -} - -#successRate .percent { - font-size: 180%; -} - -.success, .success a { - color: #008000; -} - -div.success, #successRate.success { - background-color: #bbd9bb; - border-color: #008000; -} - -.failures, .failures a { - color: #b60808; -} - -.skipped, .skipped a { - color: #c09853; -} - -div.failures, #successRate.failures { - background-color: #ecdada; - border-color: #b60808; -} - -ul.linkList { - padding-left: 0; -} - -ul.linkList li { - list-style: none; - margin-bottom: 5px; -} diff --git a/build/reports/tests/test/index.html b/build/reports/tests/test/index.html deleted file mode 100644 index 791c760733..0000000000 --- a/build/reports/tests/test/index.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - -Test results - Test Summary - - - - - -
-

Test Summary

-
- - - - - -
-
- - - - - - - -
-
-
4
-

tests

-
-
-
-
1
-

failures

-
-
-
-
0
-

ignored

-
-
-
-
0.087s
-

duration

-
-
-
-
-
-
75%
-

successful

-
-
-
-
- -
-

Failed tests

- -
-
-

Packages

- - - - - - - - - - - - - - - - - - - - - -
PackageTestsFailuresIgnoredDurationSuccess rate
-duke.task -4100.087s75%
-
-
-

Classes

- - - - - - - - - - - - - - - - - - - - - -
ClassTestsFailuresIgnoredDurationSuccess rate
-duke.task.RecurringTest -4100.087s75%
-
-
- -
- - diff --git a/build/reports/tests/test/js/report.js b/build/reports/tests/test/js/report.js deleted file mode 100644 index 83bab4a19f..0000000000 --- a/build/reports/tests/test/js/report.js +++ /dev/null @@ -1,194 +0,0 @@ -(function (window, document) { - "use strict"; - - var tabs = {}; - - function changeElementClass(element, classValue) { - if (element.getAttribute("className")) { - element.setAttribute("className", classValue); - } else { - element.setAttribute("class", classValue); - } - } - - function getClassAttribute(element) { - if (element.getAttribute("className")) { - return element.getAttribute("className"); - } else { - return element.getAttribute("class"); - } - } - - function addClass(element, classValue) { - changeElementClass(element, getClassAttribute(element) + " " + classValue); - } - - function removeClass(element, classValue) { - changeElementClass(element, getClassAttribute(element).replace(classValue, "")); - } - - function initTabs() { - var container = document.getElementById("tabs"); - - tabs.tabs = findTabs(container); - tabs.titles = findTitles(tabs.tabs); - tabs.headers = findHeaders(container); - tabs.select = select; - tabs.deselectAll = deselectAll; - tabs.select(0); - - return true; - } - - function getCheckBox() { - return document.getElementById("line-wrapping-toggle"); - } - - function getLabelForCheckBox() { - return document.getElementById("label-for-line-wrapping-toggle"); - } - - function findCodeBlocks() { - var spans = document.getElementById("tabs").getElementsByTagName("span"); - var codeBlocks = []; - for (var i = 0; i < spans.length; ++i) { - if (spans[i].className.indexOf("code") >= 0) { - codeBlocks.push(spans[i]); - } - } - return codeBlocks; - } - - function forAllCodeBlocks(operation) { - var codeBlocks = findCodeBlocks(); - - for (var i = 0; i < codeBlocks.length; ++i) { - operation(codeBlocks[i], "wrapped"); - } - } - - function toggleLineWrapping() { - var checkBox = getCheckBox(); - - if (checkBox.checked) { - forAllCodeBlocks(addClass); - } else { - forAllCodeBlocks(removeClass); - } - } - - function initControls() { - if (findCodeBlocks().length > 0) { - var checkBox = getCheckBox(); - var label = getLabelForCheckBox(); - - checkBox.onclick = toggleLineWrapping; - checkBox.checked = false; - - removeClass(label, "hidden"); - } - } - - function switchTab() { - var id = this.id.substr(1); - - for (var i = 0; i < tabs.tabs.length; i++) { - if (tabs.tabs[i].id === id) { - tabs.select(i); - break; - } - } - - return false; - } - - function select(i) { - this.deselectAll(); - - changeElementClass(this.tabs[i], "tab selected"); - changeElementClass(this.headers[i], "selected"); - - while (this.headers[i].firstChild) { - this.headers[i].removeChild(this.headers[i].firstChild); - } - - var h2 = document.createElement("H2"); - - h2.appendChild(document.createTextNode(this.titles[i])); - this.headers[i].appendChild(h2); - } - - function deselectAll() { - for (var i = 0; i < this.tabs.length; i++) { - changeElementClass(this.tabs[i], "tab deselected"); - changeElementClass(this.headers[i], "deselected"); - - while (this.headers[i].firstChild) { - this.headers[i].removeChild(this.headers[i].firstChild); - } - - var a = document.createElement("A"); - - a.setAttribute("id", "ltab" + i); - a.setAttribute("href", "#tab" + i); - a.onclick = switchTab; - a.appendChild(document.createTextNode(this.titles[i])); - - this.headers[i].appendChild(a); - } - } - - function findTabs(container) { - return findChildElements(container, "DIV", "tab"); - } - - function findHeaders(container) { - var owner = findChildElements(container, "UL", "tabLinks"); - return findChildElements(owner[0], "LI", null); - } - - function findTitles(tabs) { - var titles = []; - - for (var i = 0; i < tabs.length; i++) { - var tab = tabs[i]; - var header = findChildElements(tab, "H2", null)[0]; - - header.parentNode.removeChild(header); - - if (header.innerText) { - titles.push(header.innerText); - } else { - titles.push(header.textContent); - } - } - - return titles; - } - - function findChildElements(container, name, targetClass) { - var elements = []; - var children = container.childNodes; - - for (var i = 0; i < children.length; i++) { - var child = children.item(i); - - if (child.nodeType === 1 && child.nodeName === name) { - if (targetClass && child.className.indexOf(targetClass) < 0) { - continue; - } - - elements.push(child); - } - } - - return elements; - } - - // Entry point. - - window.onload = function() { - initTabs(); - initControls(); - }; -} (window, window.document)); \ No newline at end of file diff --git a/build/reports/tests/test/packages/duke.task.html b/build/reports/tests/test/packages/duke.task.html deleted file mode 100644 index d1ec2fa86e..0000000000 --- a/build/reports/tests/test/packages/duke.task.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - -Test results - Package duke.task - - - - - -
-

Package duke.task

- -
- - - - - -
-
- - - - - - - -
-
-
4
-

tests

-
-
-
-
1
-

failures

-
-
-
-
0
-

ignored

-
-
-
-
0.087s
-

duration

-
-
-
-
-
-
75%
-

successful

-
-
-
-
- -
-

Failed tests

- -
-
-

Classes

- - - - - - - - - - - - - - - - - - - -
ClassTestsFailuresIgnoredDurationSuccess rate
-RecurringTest -4100.087s75%
-
-
- -
- - diff --git a/build/test-results/test/TEST-duke.task.RecurringTest.xml b/build/test-results/test/TEST-duke.task.RecurringTest.xml deleted file mode 100644 index 028ac03a61..0000000000 --- a/build/test-results/test/TEST-duke.task.RecurringTest.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - org.opentest4j.AssertionFailedError: expected: not equal but was: <true> - at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:39) - at org.junit.jupiter.api.AssertNotEquals.failEqual(AssertNotEquals.java:276) - at org.junit.jupiter.api.AssertNotEquals.assertNotEquals(AssertNotEquals.java:265) - at org.junit.jupiter.api.AssertNotEquals.assertNotEquals(AssertNotEquals.java:260) - at org.junit.jupiter.api.Assertions.assertNotEquals(Assertions.java:2743) - at duke.task.RecurringTest.recurringTodoTest(RecurringTest.java:51) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675) - at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:125) - at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:132) - at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:124) - at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:74) - at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) - at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:104) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:62) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:43) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:35) - at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) - at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) - at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:202) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:198) - at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135) - at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) - at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) - at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) - at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) - at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) - at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) - at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) - at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) - at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) - at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220) - at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188) - at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202) - at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181) - at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128) - at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:102) - at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:82) - at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:78) - at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) - at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) - at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32) - at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) - at com.sun.proxy.$Proxy2.stop(Unknown Source) - at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:132) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) - at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) - at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:175) - at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:157) - at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404) - at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) - at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) - at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) - at java.base/java.lang.Thread.run(Thread.java:834) - - - - - - diff --git a/build/test-results/test/binary/output.bin b/build/test-results/test/binary/output.bin deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/build/test-results/test/binary/output.bin.idx b/build/test-results/test/binary/output.bin.idx deleted file mode 100644 index f76dd238ade08917e6712764a16a22005a50573d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1 IcmZPo000310RR91 diff --git a/build/test-results/test/binary/results.bin b/build/test-results/test/binary/results.bin deleted file mode 100644 index 57e302d182c2df42fa1f5630209304b5d106d32e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10097 zcmeHNOK;mo5SEj)KnwKTs}4Lc7gmxjSuu(Lj;+8hlGKRp7(K4YwM2{Jvdg7y{eS{J z^;Dn*iXxZ(nE?G!oqduLpK_GA2VZQFyZg;!zZnj9_;~BlpI$P<4ny(Gd5hhIQa_xW z;h6olbk%BY&7c4K{@W*8e^Wi{5c$F45F;<}L(G@hPb&voFBHm8t;c^Elnab!!D4ic zLnbjQhFV`Lgt+zOcY|<7JR+AC-P`&`t@&l^A3`S%i9ix4yL092$1$eNC*e!51bZV& z3H`9uVA5V2-$vMF*xPG|gthU{2@2Zdgtc!_yx0Do(F8yL@W;lWzWxfaHrMMa34I2C zBcEaFpvX^cIA?wkJC|UIZS0cwuFy5w+kW=67Ud0LBW{U=5kD1HIwHV&yMuMmknpp? zD8U@`KLKW^9uxLIc8XOLL(1ZvZ3$HpE>50~Z*`z>aykO0-<2Tz!Wp9&e|P2093Kct zLlgkUWdO8t-XP{*R%jaVcS>*B^@ja=4)vkTUgaUGv7ZfVV%x*9OMRXa9iA;@1o2;o>41tcDJh+04eaz{Wr;AX*U2R@ z^Jr07EKZ_`Q07d1Oc8abz6+1_vneGvJp2zxz@P7+8x|=6+XX{1yQpfTlnYJlTs5%9 zyzWMvYb-1CzT`+P|C$)sOx7S*`Zn6NH^dWfHD~x9N49YjeIdID8F!tz9DjK*WMW_N~#2IPXPk;r@6 zojm6XZMs`(TH=A`+R{zIvY{$Z`GtCK;lD&3y-z7xyz=1{2WspQa;J8BM@B<`Cs*Az za`-8lV{kg0FdSvlDc|*xNS}nBVtVbnSiJ}A2Z7yujnHj7_dIE&*^-CK!>2em+$|m5 z6Z^`Id&mu&e#Ea&y@%ZJkQ+8tV6M-;huqM}XZMu3|4+FgeT`}4vE~o)I2q4Sb`J3+N&@yu z-_(`h>V1LQ>y?*t)v(J61Kzg_@w>zFqO2PK#%EJ==7YUc2DRfnE|yaDGG8sF(mCDX zC-Hf=m+{GjLeCA0_K&Yy2fTq7I}B=LIDMCWBEzm9&Y^2`q7K1%`Fs#SzvF}-Nb}Bu zrH&<_d^UqP9;p&ro|(n*@~B;dsb21~2PU6aYb4qxR;SZxrs^=05;m-<6EhMu(_(k6 zT|P~q4QRH^?5C7hHYh@P@X&|)tbHiOC=;!oA4iC}(@YcUP~XyHnI4oG6PuSkG1(|^ zwsBGld_W-O+{zU4iXabDqn**bVve*RA8dKo0H1Fc8hhVE5j09HeGN(O*!0$pPzd>u z>TY1sLYa@Ase>Qr13GacdUCf5#}W&AGHlMnSx9ce_9;oAwU$1x>vO^lq0rh9r_LAh zr-*wVpXyrJZaQK7>Y)dm?{Nz+>0U_2Nq6l5moiy5;Yg@icZR(m$5+r@hwJr?`&Ua1mxi-3`G9TBy41Q2h+8V0obbpC>|7;XW9^ip3nJy+}yUzW%vnbmU1a2p!WU%WS8_q>M3-*ok}x0>PBBlQW|udV+8 DzrCQ} From 2cb17be7ca1f800357239ad9494a8679d26ffcc4 Mon Sep 17 00:00:00 2001 From: lmtaek Date: Tue, 17 Sep 2019 21:51:36 +0800 Subject: [PATCH 7/7] Returned necessary files to repo in order to do pull request --- build/reports/checkstyle/main.html | 958 +++++++++++++++++++++++++++++ build/reports/checkstyle/main.xml | 258 ++++++++ build/reports/checkstyle/test.html | 298 +++++++++ build/reports/checkstyle/test.xml | 66 ++ 4 files changed, 1580 insertions(+) create mode 100644 build/reports/checkstyle/main.html create mode 100644 build/reports/checkstyle/main.xml create mode 100644 build/reports/checkstyle/test.html create mode 100644 build/reports/checkstyle/test.xml diff --git a/build/reports/checkstyle/main.html b/build/reports/checkstyle/main.html new file mode 100644 index 0000000000..9410402449 --- /dev/null +++ b/build/reports/checkstyle/main.html @@ -0,0 +1,958 @@ + + + + + + + + + + + + + + +
+

CheckStyle Audit

+
Designed for use with CheckStyle and Ant.
+
+

Summary

+ + + + + + + +
FilesErrors
26203
+
+

Files

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameErrors
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\Parser.java94
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Task.java15
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\AddCommand.java13
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\DateTimeParser.java11
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\RescheduleCommand.java10
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\Ui.java7
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\RecurringCommand.java6
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\Storage.java6
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\Duke.java5
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\FixedDurationTask.java4
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\PeriodTask.java4
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\RemindCommand.java3
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\ViewCommand.java3
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Deadline.java3
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Event.java3
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Todo.java3
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\Reminder.java2
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\DeleteCommand.java2
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\DoneCommand.java2
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\ExitCommand.java2
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\FindCommand.java2
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\ListCommand.java2
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\Command.java1
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\FindFreeTimesCommand.java0
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\DukeException.java0
C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\TaskList.java0
+
+ +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\Duke.java

+ + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
Using the '.*' form of import should be avoided - duke.core.*.5
WhitespaceAround: '{' is not preceded with whitespace.11
'CTOR_DEF' should be separated from previous statement.32
First sentence of Javadoc is missing an ending period.65
'METHOD_DEF' should be separated from previous statement.71
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\Reminder.java

+ + + + + + + + + + +
Error DescriptionLine
'CTOR_DEF' should be separated from previous statement.38
'{' at column 21 should be on the previous line.54
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\AddCommand.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
First sentence of Javadoc is missing an ending period.24
First sentence of Javadoc is missing an ending period.40
Line continuation have incorrect indentation level, expected level should be 4.44
Line is longer than 120 characters (found 129).67
')' is preceded with whitespace.67
WhitespaceAround: '{' is not preceded with whitespace.67
',' is preceded with whitespace.75
';' is preceded with whitespace.77
')' is preceded with whitespace.81
WhitespaceAround: '}' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)94
WhitespaceAround: 'else' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)94
WhitespaceAround: 'else' is not preceded with whitespace.94
WhitespaceAround: '{' is not preceded with whitespace.94
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\Command.java

+ + + + + + + +
Error DescriptionLine
Line continuation have incorrect indentation level, expected level should be 4.30
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\DeleteCommand.java

+ + + + + + + + + + +
Error DescriptionLine
First sentence of Javadoc is missing an ending period.31
Line continuation have incorrect indentation level, expected level should be 4.35
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\DoneCommand.java

+ + + + + + + + + + +
Error DescriptionLine
First sentence of Javadoc is missing an ending period.30
Line continuation have incorrect indentation level, expected level should be 4.34
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\ExitCommand.java

+ + + + + + + + + + +
Error DescriptionLine
First sentence of Javadoc is missing an ending period.20
Line continuation have incorrect indentation level, expected level should be 4.24
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\FindCommand.java

+ + + + + + + + + + +
Error DescriptionLine
First sentence of Javadoc is missing an ending period.29
Line continuation have incorrect indentation level, expected level should be 4.33
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\FindFreeTimesCommand.java

+ + + + +
Error DescriptionLine
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\ListCommand.java

+ + + + + + + + + + +
Error DescriptionLine
First sentence of Javadoc is missing an ending period.21
Line continuation have incorrect indentation level, expected level should be 4.25
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\RecurringCommand.java

+ + + + + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
Using the '.*' form of import should be avoided - duke.task.*.7
First sentence of Javadoc is missing an ending period.23
Line continuation have incorrect indentation level, expected level should be 4.27
'{' at column 29 should have line break after.30
'}' at column 45 should be alone on a line.30
Empty line should be followed by <p> tag on the next line.34
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\RemindCommand.java

+ + + + + + + + + + + + + +
Error DescriptionLine
'CTOR_DEF' should be separated from previous statement.21
First sentence of Javadoc is missing an ending period.26
Line continuation have incorrect indentation level, expected level should be 4.30
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\RescheduleCommand.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
Line is longer than 120 characters (found 127).23
WhitespaceAround: 'try' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)40
WhitespaceAround: '{' is not preceded with whitespace.40
WhitespaceAround: '{' is not preceded with whitespace.42
WhitespaceAround: '}' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)48
WhitespaceAround: 'catch' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)48
WhitespaceAround: 'catch' is not preceded with whitespace.48
WhitespaceAround: '{' is not preceded with whitespace.48
First sentence of Javadoc is missing an ending period.53
Line continuation have incorrect indentation level, expected level should be 4.57
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\command\ViewCommand.java

+ + + + + + + + + + + + + +
Error DescriptionLine
'(' is preceded with whitespace.16
First sentence of Javadoc is missing an ending period.23
Line continuation have incorrect indentation level, expected level should be 4.27
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\DateTimeParser.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
Javadoc comment at column 19 has parse error. Missed HTML close tag 'code'. Sometimes it means that close tag missed for one of previous tags.9
Line is longer than 120 characters (found 128).33
Line is longer than 120 characters (found 128).34
Line is longer than 120 characters (found 128).35
Line is longer than 120 characters (found 128).36
WhitespaceAround: 'try' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)38
WhitespaceAround: '{' is not preceded with whitespace.38
WhitespaceAround: '}' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)50
WhitespaceAround: 'catch' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)50
WhitespaceAround: 'catch' is not preceded with whitespace.50
WhitespaceAround: '{' is not preceded with whitespace.50
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\DukeException.java

+ + + + +
Error DescriptionLine
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\Parser.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
Using the '.*' form of import should be avoided - duke.command.*.3
Using the '.*' form of import should be avoided - duke.task.*.4
'case' child has incorrect indentation level 12, expected level should be 8.28
'block' child has incorrect indentation level 16, expected level should be 12.29
'case' child has incorrect indentation level 12, expected level should be 8.30
'try' has incorrect indentation level 16, expected level should be 12.31
'try' child has incorrect indentation level 20, expected level should be 16.32
'try' child has incorrect indentation level 20, expected level should be 16.33
'try rcurly' has incorrect indentation level 16, expected level should be 12.34
'catch' child has incorrect indentation level 20, expected level should be 16.35
'catch rcurly' has incorrect indentation level 16, expected level should be 12.36
'case' child has incorrect indentation level 12, expected level should be 8.37
'try' has incorrect indentation level 16, expected level should be 12.38
'try' child has incorrect indentation level 20, expected level should be 16.39
'try' child has incorrect indentation level 20, expected level should be 16.40
'try rcurly' has incorrect indentation level 16, expected level should be 12.41
'catch' child has incorrect indentation level 20, expected level should be 16.42
'catch rcurly' has incorrect indentation level 16, expected level should be 12.43
'case' child has incorrect indentation level 12, expected level should be 8.44
'try' has incorrect indentation level 16, expected level should be 12.45
'try' child has incorrect indentation level 20, expected level should be 16.46
'try' child has incorrect indentation level 20, expected level should be 16.47
'try rcurly' has incorrect indentation level 16, expected level should be 12.48
'catch' child has incorrect indentation level 20, expected level should be 16.49
'catch rcurly' has incorrect indentation level 16, expected level should be 12.50
'case' child has incorrect indentation level 12, expected level should be 8.51
'try' has incorrect indentation level 16, expected level should be 12.52
'try' child has incorrect indentation level 20, expected level should be 16.53
'try' child has incorrect indentation level 20, expected level should be 16.54
'try' child has incorrect indentation level 20, expected level should be 16.55
'try rcurly' has incorrect indentation level 16, expected level should be 12.56
'}' at column 17 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).56
'catch' has incorrect indentation level 17, expected level should be 12.57
'catch' child has incorrect indentation level 20, expected level should be 16.58
'catch rcurly' has incorrect indentation level 17, expected level should be 12.59
'case' child has incorrect indentation level 12, expected level should be 8.60
'try' has incorrect indentation level 16, expected level should be 12.61
'try' child has incorrect indentation level 20, expected level should be 16.62
'try' child has incorrect indentation level 20, expected level should be 16.63
'try' child has incorrect indentation level 20, expected level should be 16.64
'try rcurly' has incorrect indentation level 16, expected level should be 12.65
'catch' child has incorrect indentation level 20, expected level should be 16.66
'catch rcurly' has incorrect indentation level 16, expected level should be 12.67
'case' child has incorrect indentation level 12, expected level should be 8.68
'try' has incorrect indentation level 16, expected level should be 12.69
'try' child has incorrect indentation level 20, expected level should be 16.70
'try' child has incorrect indentation level 20, expected level should be 16.71
'try' child has incorrect indentation level 20, expected level should be 16.72
'try rcurly' has incorrect indentation level 16, expected level should be 12.73
'catch' child has incorrect indentation level 20, expected level should be 16.74
'catch rcurly' has incorrect indentation level 16, expected level should be 12.75
'case' child has incorrect indentation level 12, expected level should be 8.76
'try' has incorrect indentation level 16, expected level should be 12.77
'try' child has incorrect indentation level 20, expected level should be 16.78
'try' child has incorrect indentation level 20, expected level should be 16.79
'try' child has incorrect indentation level 20, expected level should be 16.80
'try' child has incorrect indentation level 20, expected level should be 16.81
'try rcurly' has incorrect indentation level 16, expected level should be 12.82
WhitespaceAround: '}' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)82
WhitespaceAround: 'catch' is not preceded with whitespace.82
'catch' child has incorrect indentation level 20, expected level should be 16.83
Line is longer than 120 characters (found 181).83
'catch rcurly' has incorrect indentation level 16, expected level should be 12.85
'case' child has incorrect indentation level 12, expected level should be 8.86
'block' child has incorrect indentation level 16, expected level should be 12.87
'case' child has incorrect indentation level 12, expected level should be 8.88
'try' has incorrect indentation level 16, expected level should be 12.89
'try' child has incorrect indentation level 20, expected level should be 16.90
'try' child has incorrect indentation level 20, expected level should be 16.91
'try rcurly' has incorrect indentation level 16, expected level should be 12.92
'catch' child has incorrect indentation level 20, expected level should be 16.93
Line is longer than 120 characters (found 156).93
'catch rcurly' has incorrect indentation level 16, expected level should be 12.94
'case' child has incorrect indentation level 12, expected level should be 8.95
'try' has incorrect indentation level 16, expected level should be 12.96
'try' child has incorrect indentation level 20, expected level should be 16.97
'try' child has incorrect indentation level 20, expected level should be 16.98
'try' child has incorrect indentation level 20, expected level should be 16.99
'try' child has incorrect indentation level 20, expected level should be 16.100
'try rcurly' has incorrect indentation level 16, expected level should be 12.102
'catch' child has incorrect indentation level 20, expected level should be 16.103
'catch rcurly' has incorrect indentation level 16, expected level should be 12.104
'case' child has incorrect indentation level 12, expected level should be 8.105
Fall through from previous branch of the switch statement.105
'try' has incorrect indentation level 16, expected level should be 12.106
'try' child has incorrect indentation level 20, expected level should be 16.107
'try' child has incorrect indentation level 20, expected level should be 16.108
'try rcurly' has incorrect indentation level 16, expected level should be 12.109
'catch' child has incorrect indentation level 20, expected level should be 16.110
'catch rcurly' has incorrect indentation level 16, expected level should be 12.111
'case' child has incorrect indentation level 12, expected level should be 8.112
'block' child has incorrect indentation level 16, expected level should be 12.113
'case' child has incorrect indentation level 12, expected level should be 8.114
'block' child has incorrect indentation level 16, expected level should be 12.115
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\Storage.java

+ + + + + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
Using the '.*' form of import should be avoided - duke.task.*.3
'}' at column 17 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).54
'}' at column 17 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).64
'}' at column 17 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).74
WhitespaceAround: '}' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)82
WhitespaceAround: 'else' is not preceded with whitespace.82
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\TaskList.java

+ + + + +
Error DescriptionLine
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\core\Ui.java

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
First sentence of Javadoc is missing an ending period.10
Unused Javadoc tag.104
'(' is preceded with whitespace.106
Comment has incorrect indentation level 0, expected is 8, indentation should be the same level as line 114.116
'(' is preceded with whitespace.141
',' is preceded with whitespace.141
Missing a Javadoc comment.159
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Deadline.java

+ + + + + + + + + + + + + +
Error DescriptionLine
First sentence of Javadoc is missing an ending period.34
Line continuation have incorrect indentation level, expected level should be 4.38
First sentence of Javadoc is missing an ending period.45
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Event.java

+ + + + + + + + + + + + + +
Error DescriptionLine
First sentence of Javadoc is missing an ending period.32
Line continuation have incorrect indentation level, expected level should be 4.36
First sentence of Javadoc is missing an ending period.43
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\FixedDurationTask.java

+ + + + + + + + + + + + + + + + +
Error DescriptionLine
First sentence of Javadoc is missing an ending period.4
Summary javadoc is missing.21
Line continuation have incorrect indentation level, expected level should be 4.24
First sentence of Javadoc is missing an ending period.31
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\PeriodTask.java

+ + + + + + + + + + + + + + + + +
Error DescriptionLine
Unused @param tag for 'startTime'.26
First sentence of Javadoc is missing an ending period.37
Line continuation have incorrect indentation level, expected level should be 4.41
First sentence of Javadoc is missing an ending period.50
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Task.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
First sentence of Javadoc is missing an ending period.25
First sentence of Javadoc is missing an ending period.29
First sentence of Javadoc is missing an ending period.57
First sentence of Javadoc is missing an ending period.66
'{' at column 37 should have line break after.83
'}' at column 59 should be alone on a line.83
'{' at column 38 should have line break after.88
'}' at column 60 should be alone on a line.88
')' is preceded with whitespace.100
'{' at column 43 should have line break after.103
Line continuation have incorrect indentation level, expected level should be 4.125
Comment has incorrect indentation level 0, expected is 4, indentation should be the same level as line 164.158
Javadoc comment at column 19 has parse error. Missed HTML close tag 'code'. Sometimes it means that close tag missed for one of previous tags.161
'{' at column 5 should be on the previous line.174
'{' at column 37 should have line break after.175
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\main\java\duke\task\Todo.java

+ + + + + + + + + + + + + +
Error DescriptionLine
First sentence of Javadoc is missing an ending period.18
Line continuation have incorrect indentation level, expected level should be 4.22
First sentence of Javadoc is missing an ending period.29
+ Back to top +
+ + diff --git a/build/reports/checkstyle/main.xml b/build/reports/checkstyle/main.xml new file mode 100644 index 0000000000..777ddd1884 --- /dev/null +++ b/build/reports/checkstyle/main.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/reports/checkstyle/test.html b/build/reports/checkstyle/test.html new file mode 100644 index 0000000000..10e2dd1b81 --- /dev/null +++ b/build/reports/checkstyle/test.html @@ -0,0 +1,298 @@ + + + + + + + + + + + + + + +
+

CheckStyle Audit

+
Designed for use with CheckStyle and Ant.
+
+

Summary

+ + + + + + + +
FilesErrors
553
+
+

Files

+ + + + + + + + + + + + + + + + + + + +
NameErrors
C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\DeadlineTest.java15
C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\EventTest.java15
C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\TodoTest.java10
C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\core\ParserTest.java7
C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\PeriodTaskTest.java6
+
+ +

File C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\core\ParserTest.java

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
Using the '.*' form of import should be avoided - duke.command.*.3
Distance between variable 'c4' declaration and its first usage is 4, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).18
Distance between variable 'c5' declaration and its first usage is 5, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).19
Distance between variable 'c6' declaration and its first usage is 6, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).20
Distance between variable 'c7' declaration and its first usage is 7, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).21
Distance between variable 'c8' declaration and its first usage is 8, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).22
Distance between variable 'c9' declaration and its first usage is 9, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).23
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\DeadlineTest.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
Using the '.*' form of import should be avoided - org.junit.jupiter.api.Assertions.*.6
Line is longer than 120 characters (found 163).16
Unicode escape(s) usage should be avoided.16
'(' is followed by whitespace.16
Line is longer than 120 characters (found 173).24
'(' is followed by whitespace.24
Line is longer than 120 characters (found 145).50
Unicode escape(s) usage should be avoided.50
'(' is followed by whitespace.50
Line is longer than 120 characters (found 134).51
'(' is followed by whitespace.51
Line is longer than 120 characters (found 146).56
Unicode escape(s) usage should be avoided.56
Line is longer than 120 characters (found 126).57
'(' is followed by whitespace.57
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\EventTest.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
Using the '.*' form of import should be avoided - org.junit.jupiter.api.Assertions.*.7
Method name 'EventStringTest' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9_]*$'.15
Line is longer than 120 characters (found 168).16
Unicode escape(s) usage should be avoided.16
Line is longer than 120 characters (found 154).24
'(' is followed by whitespace.24
Line is longer than 120 characters (found 139).50
Unicode escape(s) usage should be avoided.50
'(' is followed by whitespace.50
Line is longer than 120 characters (found 128).51
'(' is followed by whitespace.51
Line is longer than 120 characters (found 137).56
Unicode escape(s) usage should be avoided.56
Line is longer than 120 characters (found 128).57
'(' is followed by whitespace.57
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\PeriodTaskTest.java

+ + + + + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
Using the '.*' form of import should be avoided - org.junit.jupiter.api.Assertions.*.6
Method name 'PeriodTaskStringTest' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9_]*$'.14
Line is longer than 120 characters (found 229).15
Unicode escape(s) usage should be avoided.15
Line is longer than 120 characters (found 208).23
'(' is followed by whitespace.23
+ Back to top +

File C:\Users\acer\Desktop\personalMainDuke\src\test\java\duke\task\TodoTest.java

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Error DescriptionLine
Using the '.*' form of import should be avoided - org.junit.jupiter.api.Assertions.*.6
WhitespaceAround: '{' is not preceded with whitespace.15
Unicode escape(s) usage should be avoided.16
Line is longer than 120 characters (found 124).24
'(' is followed by whitespace.24
Unicode escape(s) usage should be avoided.50
'(' is followed by whitespace.50
'(' is followed by whitespace.51
Unicode escape(s) usage should be avoided.56
'(' is followed by whitespace.57
+ Back to top +
+ + diff --git a/build/reports/checkstyle/test.xml b/build/reports/checkstyle/test.xml new file mode 100644 index 0000000000..ebc36f73b5 --- /dev/null +++ b/build/reports/checkstyle/test.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +