Showing 90 of 94 total issues
Method keyword_cmd
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def keyword_cmd(type, keyword_t, lparen_t=nil, args=[], rparen_t=nil)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(dot_l, selector_l, begin_l, end_l, expression_l)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(keyword_l, in_l, begin_l, end_l, expression_l)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(keyword_l, begin_l, else_l, end_l, expression_l)
Method ternary_map
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def ternary_map(begin_e, question_t, mid_e, colon_t, end_e)
Method block
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def block(method_call, begin_t, args, body, end_t)
Method endless_definition_map
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e)
Method def_method
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def def_method(def_t, name_t, args,
body, end_t)
Method diagnostic
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def diagnostic(level, reason, arguments, location_t, highlights_ts=[])
Method eh_keyword_map
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def eh_keyword_map(compstmt_e, keyword_t, body_es,
else_t, else_e)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(level, reason, arguments, location, highlights=[])
Method in_pattern
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def in_pattern(in_t, pattern, guard, then_t, body)
Method process
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def process(initial_buffer)
buffer = initial_buffer
original_name = buffer.name
@rewriters.each do |rewriter_class|
- 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 collection_map
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def collection_map(begin_t, parts, end_t)
if begin_t.nil? || end_t.nil?
if parts.any?
expr_l = join_exprs(parts.first, parts.last)
elsif !begin_t.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 condition_map
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t)
if end_t
end_l = loc(end_t)
elsif else_e && else_e.loc.expression
end_l = else_e.loc.expression
- 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 match_hash_var_from_str
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def match_hash_var_from_str(begin_t, strings, end_t)
if strings.length > 1
diagnostic :error, :pm_interp_in_var_name, nil, loc(begin_t).join(loc(end_t))
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 merge_replacements
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def merge_replacements(actions)
result = ''.dup
prev_act = nil
actions.each do |act|
- 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 render_line
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def render_line(range, ellipsis=false, range_end=false)
source_line = range.source_line
highlight_line = ' ' * source_line.length
@highlights.each do |highlight|
- 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 static_string
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def static_string(nodes)
nodes.map do |node|
case node.type
when :str
node.children[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 action_summary
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def action_summary
replacements = as_replacements
case replacements.size
when 0 then return 'empty'
when 1..3 then #ok
- 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"