Showing 209 of 263 total issues
Method test_table
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def test_table
frame("Forms",margins: 10,bg: "#FEE") { table(2,10,{set_column_spacings: 3}) do
row { cell_right(label "state") ; cell(button("set") { alert("?") }) }
row { cell_right label "speed" ; cell(entry("aa")) }
row { cell_right label "size" ; cell ientry(11,{:min=>0,:max=>100,:by=>1}) }
- 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 end_command
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def end_command(item)
lw=@lw.dup
@lw=[]
return if !item || item.size==0 || lw.size<1
puts " menu: #{item} ==> #{lw.join(' ')}"
- 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 set_selected
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
; def set_selected(indice)
b0.group.reverse.each_with_index { |w,index|
if !w.active? && indice.to_i==index
puts "setsel #{index}"
w.set_active(true) rescue p $!
- 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 slot_append_after
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def slot_append_after(w,wref)
if $__mainthread__ != Thread.current
gui_invoke { slot_append_after(w,wref) }
return
end
- 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 set_data
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def scrolled_win.set_data(hdata,parent=nil,first=true)
raise("tree.set_data() out of main thread!")if $__mainthread__ != Thread.current
if parent==nil && first
@ruiby_data=hdata
model.clear()
- 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 get_stockicon_pixbuf
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_stockicon_pixbuf(name)
begin
icn="#{name.downcase.gsub('_','-')}"
return Gtk::IconTheme.default().load_icon(icn,16,0)
rescue Exception => ee
- 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 list
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def list(title,w=0,h=0,options={})
scrolled_win = Gtk::ScrolledWindow.new
scrolled_win.set_policy(:automatic ,:automatic )
scrolled_win.set_width_request(w) if w>0
scrolled_win.set_height_request(h) if h>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 slot_append_before
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def slot_append_before(w,wref)
if $__mainthread__ != Thread.current
gui_invoke { slot_append_before(w,wref) }
return
end
- 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 on_canvas_button_motion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def on_canvas_button_motion(&blk )
_accept?(:handler)
@currentCanvas.signal_connect('motion_notify_event') { |w,e|
next unless w.get_memo()
w.set_memo(blk.call(w,e,w.get_memo)) rescue error($!)
- 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"