Showing 5 of 351 total issues
Method new_project
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def new_project
v.new_window do |app, nv|
if MiGA::MiGA.initialized?
folder = app.ask_save_folder
if folder.nil? or MiGA::Project.exist?(folder)
- 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 report
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def report
header("\xC2\xBB " + c.project.name.unmiga_name)
stack(margin:40) do
@done_para = subtitle "Dataset tasks advance: "
@done = 0.0
- 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 box
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def box(opts={}, &blk)
flow(margin_bottom:5) do
opts[:alpha] ||= 0.2
opts[:side_line] ||= miga_blue
opts[:background] ||= miga_blue(opts[:alpha])
- 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 open_project
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def open_project
v.new_window do |app, nv|
folder = app.ask_open_folder
if folder.nil? or not MiGA::Project.exist?(folder)
app.alert "Cannot find a MiGA project at #{folder}!" unless folder.nil?
- 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 graphic_advance
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def graphic_advance(ds, h=10)
ds_adv = ds.profile_advance
flow(width:30*MiGA::Dataset.PREPROCESSING_TASKS.size) do
nostroke
col = ["#CCC", rgb(119,130,61), rgb(160,41,50)]
- 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"