-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update FileUtils.java #364
Conversation
Make sure we do not raise an error when no file is found using the workspace
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: FAILED
Change in average Code Health of affected files: -0.02 (6.21 -> 6.19)
- Declining Code Health: 1 findings(s) 🚩
for (final String folder : a.getWorkingPaths()) { | ||
IContainer[] containers = ROOT.findContainersForLocation(new Path(folder)); | ||
for (IContainer container : containers) { | ||
final String file = findInWorkspace(fp, container, mustExist); | ||
if (file != null) { | ||
DEBUG.OUT("Hit with workspace-based search: " + file); | ||
return file; | ||
} |
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 worse: Complex Method
constructAbsoluteFilePath increases in cyclomatic complexity from 11 to 12, threshold = 9
@@ -9,8 +9,6 @@ | |||
********************************************************************************************************/ | |||
package gama.core.common.util; | |||
|
|||
import static java.util.stream.Collectors.toList; |
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 worse: Overall Code Complexity
The mean cyclomatic complexity increases from 4.93 to 4.96, threshold = 4
for (final String folder : a.getWorkingPaths()) { | ||
IContainer[] containers = ROOT.findContainersForLocation(new Path(folder)); | ||
for (IContainer container : containers) { | ||
final String file = findInWorkspace(fp, container, mustExist); | ||
if (file != null) { | ||
DEBUG.OUT("Hit with workspace-based search: " + file); | ||
return file; | ||
} |
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 worse: Deep, Nested Complexity
constructAbsoluteFilePath increases in nested complexity depth from 4 to 5, threshold = 4
Make sure we do not raise an error when no file is found using the workspace. Fixes #318