Showing 209 of 263 total issues
Method properties
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
def properties(title,hash,options={:edit=>false, :scroll=>[0,0]})
if ! defined?(@prop_index)
@prop_index=0
@prop_hash={}
else
File canvas.rb
has 268 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'timeout'
require_relative '../lib/Ruiby'
# Usage
# CanvasBinding.eval_in(cv) {}
Method read
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def read(t0,t1,lcotes)
date0,date1=t0.gmtime.strftime("%Y_%m"),t1.gmtime.strftime("%Y_%m")
t0gmt,t1gmt=t0.gmtime.to_i,t1.gmtime.to_i
lvalues=(0..lcotes.size-1).map {[]}
(date0..date1).each do |date|
- 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 expose
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def expose(cv,ctx)
ssize=cv.get_size_request()
############## Liste
@cv.draw_rectangle(0,0,ssize.first,ssize.last,0,nil,"#888",0)
@cv.draw_rectangle(2,2,ssize.first-4,ssize.last-4,15,"#555",$BG,3)
- 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 axe
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def axe(min,max,pas,sens)
x0=20
x1=15
l=[]; l << [x0,x0]
(min+2*x0).step(max,pas) { |v|
- 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 expose_trading
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def expose_trading(cv,ctx)
return if $hcotes.size<1
top=Time.now
@sx,@sy=size()
@wcurve=@sx/@nb_col
- 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 expose_trading
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
def expose_trading(cv,ctx)
return if $hcotes.size<1
top=Time.now
@sx,@sy=size()
@wcurve=@sx/@nb_col
File pipeplot.rb
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_relative '../lib/Ruiby'
#require 'Ruiby'
$bgcolor=Ruiby_dsl.html_color("#023")
Method test_canvas_draw
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_canvas_draw()
stack do
canvas(400,300) do
on_canvas_draw do |cv,cr|
cv.draw_pie(
Method _exe_windows
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def _exe_windows(cmd,to)
Thread.new(cmd,to) do |cmd,to|
begin
STDOUT.sync = true
process=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 do_dialog
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def do_dialog()
l=@licones_name.grep(/#{@e.text}/)
if l.size==0
alert("no found *#{@e.text}*")
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 show
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
def show(app)
app.instance_eval do
#======================== dialog choix cotes et periode
profondeur=DynVar.new(1)
ok=dialog("Cotes") do
Method run
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run(wspy,wtarget,stempo,str_size)
tempo= (stempo.size>0) ? (stempo.to_f)/1000.0 : nil
tr_size=(str_size.size>0) ? str_size.to_i : nil
tempo=22 if tr_size && ! tempo
raise("missing proxy port number") if wspy[:port].text.size==0 || wspy[:port].text.to_i<=0
Method extract_doc_dsl
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def extract_doc_dsl()
glob=File.dirname(__FILE__)+"/../lib/ruiby_gtk/**/*.rb"
hdoc={}
Dir[glob].each do |src| next if src =~ /dsl.rb/
content=File.read(src)
- 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 test_canvas
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def test_canvas()
flow do
stack do
button("Color") {
@color=ask_color()
- 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 secure_main
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def secure_main()
if defined?(EM)
puts "Ruiby mainloop: EM is detected, mainloop while be mixed EM/Gtk"
EM::run do
give_tick = proc do
- 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 sel_align
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def sel_align(direction,sens)
return unless has_selection?()
lv=@select[:list]
bx0,by0,bx1,by1=Group.new(lv).bbox.values
lv.each { |v|
- 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_accepter
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def _set_accepter(layout,*types)
if types.size==1
layout.define_singleton_method(:accept?) do |type|
raise("No command #{type} accepted here, accept=#{types}/") unless types.first==type
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 dialog_minmax
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def dialog_minmax(wbutton,h,value)
f1=DynVar.new(h[:param1])
f2=DynVar.new(h[:param2])
ok=dialog_async("Saisie Seuils #{h['name']}", response: proc {
if f1.value<f2.value
- 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 component
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def component()
stack do
a=slot(Image.new( :stock => Gtk::Stock::OPEN, :size => :button))
sloti(htoolbar do
toolbar_button("open","ouvrir fichier") {
- 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"