samples/pipeplot.rb
Method run_window
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def run_window()
Ruiby.app width: $W, height: $H, title: "Curve" do
fn=Ruiby::MEDIA+"/famfamfam/chart_curve.png"
set_icon(fn) if File.exists?(fn)
set_resizable(true)
File pipeplot.rb
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require_relative '../lib/Ruiby'
#require 'Ruiby'
$bgcolor=Ruiby_dsl.html_color("#023")
Method run_window
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
def run_window()
Ruiby.app width: $W, height: $H, title: "Curve" do
fn=Ruiby::MEDIA+"/famfamfam/chart_curve.png"
set_icon(fn) if File.exists?(fn)
set_resizable(true)
- 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 initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def initialize(noc,min,max,label,dxlabel,auto_scale)
Method register_value
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def register_value(data)
if data.is_a? Array
svalue=data[@noc]
return if !svalue || svalue !~ /[\d.]+/
@value=svalue.to_f
- 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 add
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def add(noc,y0,y1,label,autoscale)