Showing 45 of 53 total issues
Method hilite
has a Cognitive Complexity of 402 (exceeds 5 allowed). Consider refactoring. Open
def hilite(output)
return false if (!output.is_resizable?)
output.resize(0,0)
output.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 hilite
has 438 lines of code (exceeds 25 allowed). Consider refactoring. Open
def hilite(output)
return false if (!output.is_resizable?)
output.resize(0,0)
output.clear
Method to_order_3
has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring. Open
def to_order_3
ref = @reference
if ref.nil?
ref = Coopy::Alignment.new
ref.range(@ha,@ha)
- 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 table_diff.rb
has 576 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Coopy
class TableDiff
def initialize(align, flags)
@align = align # Alignment
Method examine_cell
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
def self.examine_cell(x, y, value, vcol, vrow, vcorner, cell)
cell.category = ""
cell.category_given_tr = ""
cell.separator = ""
cell.conflicted = false
- 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 to_order_3
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
def to_order_3
ref = @reference
if ref.nil?
ref = Coopy::Alignment.new
ref.range(@ha,@ha)
Method align_core_2
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
def align_core_2(align, a, b)
if (align.meta.nil?)
align.meta = Coopy::Alignment.new
end
align_columns(align.meta,a,b)
- 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 align_columns
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def align_columns(align, a, b)
align.range(a.width,b.width)
align.tables(a,b)
align.set_rowlike(false)
- 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 spread_context
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def spread_context(units, del, active)
if (del>0 && active != nil)
# forward
mark = -del-1
skips = 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 align_core_2
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
def align_core_2(align, a, b)
if (align.meta.nil?)
align.meta = Coopy::Alignment.new
end
align_columns(align.meta,a,b)
Method trim_blank
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def trim_blank
return true if (h==0)
h_test = @height
h_test = 3 if (h_test>=3)
view = get_cell_view
- 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 align_columns
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
def align_columns(align, a, b)
align.range(a.width,b.width)
align.tables(a,b)
align.set_rowlike(false)
File compare_table.rb
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Coopy
class CompareTable
def attach(comp)
@comp = comp # TableComparisonState
Method examine_cell
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.examine_cell(x, y, value, vcol, vrow, vcorner, cell)
cell.category = ""
cell.category_given_tr = ""
cell.separator = ""
cell.conflicted = false
Method render
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def render(rows)
return if (rows.width==0||rows.height==0)
render = self
render.begin_table()
change_row = -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
File diff_render.rb
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Coopy
class DiffRender
def initialize
@text_to_insert = []
Method move_without_extras
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.move_without_extras(src, dest)
return nil if (src.length!=dest.length)
return [] if (src.length<=1)
len = src.length
Method get_separator
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def get_separator(t, t2, root)
sep = root
w = t.width
h = t.height
view = t.get_cell_view
- 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 is_reordered
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def is_reordered(m, ct)
reordered = false
l = -1
r = -1
(0..ct-1).each do |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 sample_css
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
def sample_css()
return ".highlighter .add
background-color: #7fff7f
end