-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup of gama-server #226
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Code Health Quality Gates: OK
- Improving Code Health: 3 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
@@ -257,7 +257,7 @@ static public String constructAbsoluteFilePathAlternate(final IScope scope, fina | |||
|
|||
ex.addContext(file.getAbsolutePath()); | |||
} | |||
// We havent found the file, but it may not exist. In that case, the | |||
// We haven't found the file, but it may not exist. In that case, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 5.08 to 4.93, threshold = 4
gama.headless/src/gama/headless/runtime/GamaHeadlessWebSocketServer.java
Show resolved
Hide resolved
@@ -337,7 +337,7 @@ public IExperimentPlan retrieveExperimentPlan(final WebSocket socket, final IMap | |||
"For " + map.get("type") + ", mandatory parameter is: " + ISocketCommand.EXP_ID, map, false)); | |||
} | |||
plan = getExperiment(socket_id, exp_id); | |||
if (plan == null || plan.getAgent() == null || plan.getAgent().dead() || plan.getCurrentSimulation() == null) { | |||
if (plan == null || plan.getAgent() == null || plan.getAgent().dead()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Getting better: Complex Conditional
retrieveExperimentPlan decreases from 1 complex conditionals with 3 branches to 1 complex conditionals with 2 branches, threshold = 2
Fixes #172 and try to address a few other issues