Method checkVersions
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
public static void checkVersions(){
boolean doCheck = Boolean.parseBoolean(System.getProperty(ND4JSystemProperties.VERSION_CHECK_PROPERTY, "true"));
if(!doCheck){
return;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method checkVersions
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static void checkVersions(){
boolean doCheck = Boolean.parseBoolean(System.getProperty(ND4JSystemProperties.VERSION_CHECK_PROPERTY, "true"));
if(!doCheck){
return;
Method listGitPropertiesFiles
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static List<URI> listGitPropertiesFiles() {
Enumeration<URL> roots;
try {
roots = VersionCheck.class.getClassLoader().getResources("ai/skymind/");
} catch (IOException e){
Method getVersionInfos
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static List<VersionInfo> getVersionInfos() {
boolean dl4jFound = false;
boolean datavecFound = false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getVersionInfos
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static List<VersionInfo> getVersionInfos() {
boolean dl4jFound = false;
boolean datavecFound = false;
Method listGitPropertiesFiles
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static List<URI> listGitPropertiesFiles() {
Enumeration<URL> roots;
try {
roots = VersionCheck.class.getClassLoader().getResources("ai/skymind/");
} catch (IOException e){
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method versionInfoString
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static String versionInfoString(Detail detail) {
StringBuilder sb = new StringBuilder();
for(VersionInfo grp : getVersionInfos()){
sb.append(grp.getGroupId()).append(" : ").append(grp.getArtifactId()).append(" : ").append(grp.getBuildVersion());
switch (detail){
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"