chownces / ip Goto Github PK
View Code? Open in Web Editor NEWThis project forked from nus-cs2103-ay2122s1/ip
This project forked from nus-cs2103-ay2122s1/ip
We did an automated analysis of your code to detect potential areas to improve the code quality. We are sharing the results below, so that you can avoid similar problems in your tP code (which will be graded more strictly for code quality).
IMPORTANT: Note that the script looked for just a few easy-to-detect problems only, and at-most three example are 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 ๐
No easy-to-detect issues ๐
No easy-to-detect issues ๐
No easy-to-detect issues ๐
Example from src/main/java/duke/controller/MainWindow.java
lines 41-45
:
/**
* Set the Duke instance in the JavaFx application.
*
* @param d The Duke instance.
*/
Suggestion: Ensure method/class header comments follow the format specified in the coding standard, in particular, the phrasing of the overview statement
No easy-to-detect issues ๐
โ You are not required to (but you are welcome to) fix the above problems in your iP, unless you have been separately asked to resubmit the iP due to code quality issues.
โน๏ธ The bot account @nus-se-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.
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 three example are 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 ๐
No easy-to-detect issues ๐
Example from src/main/java/duke/Parser.java
lines 18-82
:
public static TaskExecution parse(String command) throws DukeException {
if (command.equals("list")) {
return (tasks, mainStorage, archiveStorage) -> tasks.list();
} else if (command.matches("^done -?[0-9]+$")) {
return (tasks, mainStorage, archiveStorage) -> {
String output = tasks.done(command);
mainStorage.save(tasks.toSaveFormat());
return output;
};
} else if (command.matches("^todo( .*)?")) {
return (tasks, mainStorage, archiveStorage) -> {
String output = tasks.todo(command);
mainStorage.save(tasks.toSaveFormat());
return output;
};
} else if (command.matches("^deadline( .*)?")) {
return (tasks, mainStorage, archiveStorage) -> {
String output = tasks.deadline(command);
mainStorage.save(tasks.toSaveFormat());
return output;
};
} else if (command.matches("^event( .*)?")) {
return (tasks, mainStorage, archiveStorage) -> {
String output = tasks.event(command);
mainStorage.save(tasks.toSaveFormat());
return output;
};
} else if (command.matches("^delete -?[0-9]+$")) {
return (tasks, mainStorage, archiveStorage) -> {
String output = tasks.delete(command);
mainStorage.save(tasks.toSaveFormat());
return output;
};
} else if (command.matches("^find( .*)?")) {
return (tasks, mainStorage, archiveStorage) -> {
String output = tasks.find(command);
mainStorage.save(tasks.toSaveFormat());
return output;
};
} else if (command.equals("archive")) {
String successMessage = "Successfully archived!";
return (tasks, mainStorage, archiveStorage) -> {
archiveStorage.save(tasks.toSaveFormat());
tasks.clearAllTasks();
mainStorage.save(tasks.toSaveFormat());
return successMessage;
};
} else if (command.equals("loadArchive")) {
String successMessage = "Successfully loaded archive!";
String errorMessage = "Error while loading archive file! Does it exist?";
return (tasks, mainStorage, archiveStorage) -> {
List<String> fileContents;
try {
fileContents = archiveStorage.load();
} catch (IOException e) {
return errorMessage;
}
tasks.appendListOfStrings(fileContents);
mainStorage.save(tasks.toSaveFormat());
return successMessage;
};
} else {
throw new UnknownCommandException();
}
}
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.
Example from src/main/java/duke/Task.java
lines 38-42
:
/**
* Get the description of the task.
*
* @return The description of the task.
*/
Suggestion: Ensure method/class header comments follow the format specified in the coding standard, in particular, the phrasing of the overview statement
No easy-to-detect issues ๐
โน๏ธ 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.