Showing 52 of 79 total issues
Avoid too many return
statements within this function. Open
return "variable";
Avoid too many return
statements within this function. Open
return "builtin";
Avoid too many return
statements within this function. Open
return "keyword";
Avoid too many return
statements within this function. Open
return "keyword";
Avoid too many return
statements within this method. Open
return element
Method wait_starting
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def wait_starting
begin
timeout(wait_process_starting_seconds) do
loop do
break if pid && Process.kill(0, pid)
- 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_section
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def render_section(key, options)
section_class = object.class._sections[key]
children = object.__send__(key) || { "0" => {} }
html = ""
html_class = "js-nested-column #{section_class.multi ? "js-multiple" : ""}"
- 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 reformat_value
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def reformat_value(name, value)
type = column_type(name)
return value if type.nil? # name == :time_key
return value.to_sym if type == :enum
return value if type == :regexp
- 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 finish
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def finish
@setting = target_class.new(setting_params)
unless @setting.valid?
return render "shared/settings/show"
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 _matches
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _matches
return [] if %i(json csv tsv ltsv).include?(@plugin_name)
begin
io = File.open(path)
reader = FileReverseReader.new(io)
- 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 initial_params
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def initial_params
new # ensure to load attributes
params = {}
self._defaults.each do |key, value|
if key.to_s.start_with?("@")
- 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 index
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def index
name = params[:name]
type = params[:type]
prefix = case type
when "input"
- 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"