Showing 27 of 136 total issues
Avoid too many return
statements within this method. Open
return int.class;
Avoid too many return
statements within this method. Open
return long.class;
Avoid too many return
statements within this method. Open
return short.class;
Avoid too many return
statements within this method. Open
return boolean.class;
Method binaryToInternal
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static String binaryToInternal(String binaryName) {
String baseName = getComponentBase(binaryName);
StringBuilder sb = new StringBuilder();
int dimensionCount = getDimensionCount(binaryName);
for (int i = 0; i < dimensionCount; i++) {
- 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 which
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.which(cmd)
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
exts.each do |ext|
exe = File.join(path, "#{cmd}#{ext}")
- 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 extract_file
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.extract_file(zip, name, dest)
Zip::File.open(zip) do |zf|
zf.each do |e|
next unless e.name == name
e.extract(dest) { true } # overwrite
- 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"