Showing 209 of 263 total issues
File gemstat.rb
has 2731 lines of code (exceeds 250 allowed). Consider refactoring. Open
$authors= %w{wycats markbates jimweirich} # seems the most productives...
$authors1= %w{rdaubarede}
LOCAL_HTDOCS="d:/usr/"
RUBYGEMS="http://rubygems.org"
File draw.rb
has 834 lines of code (exceeds 250 allowed). Consider refactoring. Open
puts "Not terminted !!!!!"
require_relative '../lib/ruiby'
############################### Complete ruiby dsl for vector widget
Method canvas
has 308 lines of code (exceeds 25 allowed). Consider refactoring. Open
def canvas(width,height,option={})
autoslot()
cv=DrawingArea.new()
cv.width_request=width
cv.height_request=height
File gadget_trading.rb
has 465 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'json'
require 'httpclient'
require 'yahoo-finance'
require 'Ruiby' unless Dir.exists?("../lib/ruiby_dsl")
require_relative '../lib/Ruiby.rb' if Dir.exists?("../lib/ruiby_dsl")
File test.rb
has 464 lines of code (exceeds 250 allowed). Consider refactoring. Open
$time_start=Time.now.to_f*1000
$mlog=[]
def mlog(text)
delta=(Time.now.to_f*1000-$time_start).to_i
$mlog << [delta,text]
Method component
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
def component()
stack do
#------------ title + entry
stacki do
flow 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 plot
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
def plot(width,height,curves,config={})
plot=canvas(width,height) do
on_canvas_draw { |w,ctx| w.expose(w,ctx) }
on_canvas_button_press { |w,event| w.track(event)}
end
Method ruiby_require
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
def ruiby_require(*gems)
w=nil
gems=gems.map {|g| g.split(/\s+/)}.flatten
gems.each do|gem|
begin
- 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
File canvas.rb
has 412 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Ruiby_dsl
# Create a drawing area, for pixel/vectoriel draw
# for interactive actions see test.rb fo little example.
#
Class VCanvas_editable
has 43 methods (exceeds 20 allowed). Consider refactoring. Open
class VCanvas_editable < VCanvas
def initialize(win,w,h,options)
super
@current=nil
@select={}
Method canvasOld
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def canvasOld(width,height,option={})
puts "*** DEPRECATED: use canvas do end in place of canvasOld ***"
autoslot()
w=DrawingArea.new()
w.width_request=width
- 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 game
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def game()
mat2=@oldmat
MAXC.times do |col| MAXL.times do |li|
poids= 0; n=0
[-1, 0, 1].each { |col_off| [-1, 0, 1].each { |li_off|
- 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 bench
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
def bench(code)
begin
eval( "class Test ; def self.test() #{([code]*100).join(" ; ")} ; end ; end ",$global)
__i=0
istep=100 # number of Test.test() in the while()
Method _radio_buttons
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def _radio_buttons(sens,ltext=["empty!"],value=-1,&blk)
is_dyn = (DynVar === value)
b0=nil
s=var_box(sens,{},false) {
ltext.each_with_index {|txt,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 run
has a Cognitive Complexity of 34 (exceeds 5 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
- 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 game
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def game()
mat2=@oldmat
MAXC.times do |col| MAXL.times do |li|
nb_neighboring= 0
[-1, 0, 1].each { |col_off| [-1, 0, 1].each { |li_off|
- 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 feed_update
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def feed_update(win,st,url)
return unless url && url.size>0
#win.set_title(url.gsub(/https?:\/\//,""))
gui_invoke { gui_invoke { win.clear(st) } }
rss = SimpleRSS.parse open(url)
- 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
File benchi.rb
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_relative '../lib/Ruiby'
require 'timeout'
$global=binding
class Test ; def self.test() 1 end ; end
Method get_update
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def get_update(app)
return if Thread.list.size>2
Thread.new {
now=Time.now
if $first || $fr_ouverture.member?(Time.now.hour)
- 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 99 lines of code (exceeds 25 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") {