- ๐ญ Iโm currently studying in NUS (Computer Science)!
- ๐ฑ Iโm currently learning ML and BlockChain!
- ๐ฌ View my portfolio website here
ong6 / ip Goto Github PK
View Code? Open in Web Editor NEWThis project forked from nus-cs2103-ay2021s2/ip
This project forked from nus-cs2103-ay2021s2/ip
We did an automated analysis of your code to detect potential areas to improve the code quality. We are sharing the results below, to help you improve the code further.
IMPORTANT: Note that the script looked for just a few easy-to-detect problems only, and at-most one example is given i.e., there can be other areas/places to improve.
No easy-to-detect issues ๐
No easy-to-detect issues ๐
No easy-to-detect issues ๐
No easy-to-detect issues ๐
No easy-to-detect issues ๐
Example from src/main/java/duke/Parser.java
lines 41-97
:
private String identifyInput(String input) throws DukeGeneralException, DukeTaskException, IOException {
Task temp;
String output;
switch (getCommand(input)) {
case "bye":
try {
storage.save(tasks);
} catch (IOException e) {
return duke.Ui.showLoadingError();
}
output = duke.Ui.showBye();
break;
case "list":
if (tasks.isEmpty()) {
return duke.Ui.showDukeEmptyListError();
}
output = duke.Ui.showList(tasks);
break;
case "find":
output = duke.Ui.showFind(tasks, getMessage(input).trim());
break;
case "done":
tasks.setDone(duke.Ui.getIndex(input));
output = duke.Ui.showDone(input, tasks);
break;
case "todo":
temp = new ToDo(getMessage(input));
output = duke.Ui.showTaskAdded(tasks, temp);
tasks.add(temp);
break;
case "deadline":
temp = new Deadline(getMessage(input));
output = duke.Ui.showTaskAdded(tasks, temp);
tasks.add(temp);
break;
case "event":
temp = new Event(getMessage(input));
output = duke.Ui.showTaskAdded(tasks, temp);
tasks.add(temp);
break;
case "delete":
output = duke.Ui.showDeleteTask(input, tasks);
tasks.remove(duke.Ui.getIndex(input));
break;
case " ":
output = duke.Ui.showEmptyError();
break;
case "archive":
String archivePath = getMessage(input).trim();
output = duke.Ui.showArchiveTasks(tasks, archivePath);
storage.archive(tasks, archivePath);
break;
default:
throw new DukeGeneralException("");
}
return output;
}
Suggestion: Consider applying SLAP (and other abstraction mechanisms) to shorten methods. You may ignore this suggestion if you think a longer method is justified in a particular case.
โน๏ธ The bot account @cs2103-bot used to post this issue is un-manned. Do not reply to this post (as those replies will not be read). Instead, contact [email protected]
if you want to follow up on this post.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.