Showing 316 of 336 total issues
Function CHILD
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
"CHILD": function( type, what, argument, first, last ) {
Function augmentWidthOrHeight
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(volt_app, target, context, binding_name, branches)
Function superMatcher
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
superMatcher = function( seed, context, xml, results, expandContext ) {
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(handler, path, tag_name, attributes, unary)
Method log_dispatch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def log_dispatch(class_name, method_name, run_time, args, error)
Method add_multiple_attribute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_multiple_attribute(tag_name, id, attribute_name, parts, content)
Method detect_added_and_moved
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def detect_added_and_moved(skip_channel)
previous_index = 0
@current_ids.each_with_index do |id, index|
if (cur_previous = @previous_ids[previous_index]) && cur_previous == id
# Same in both previous and new
- 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 update_binding_anchors!
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def update_binding_anchors!(nodes)
new_bindings = {}
@binding_anchors.each_pair do |name, anchors|
new_name = @@binding_number
- 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 call_ready
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def call_ready
if @controller
# Set the current section on the controller if it wants so it can manipulate
# the dom if needed.
# Only assign sections for action's, so we don't get AttributeSections bound
- 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 connect!
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def connect!
# The websocket url can be overridden by config.public.websocket_url
socket_url = Volt.config.try(:public).try(:websocket_url) || begin
"#{`document.location.host`}/socket"
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 delete
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def delete(collection, id)
# Load the model, then call .destroy on it
query = nil
Volt.skip_permissions 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 assign_all_attributes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def assign_all_attributes(attrs, track_changes = false)
# Assign each attribute using setters
attrs.each_pair do |key, value|
key = key.to_sym
- 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 colorize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def colorize(string, color)
if STDOUT.tty? && string
case color
when :cyan
"\e[1;34m" + string + "\e[0;37m"
- 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_changed
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def run_changed(attribute_name = nil)
# no_validate mode should only be used internally. no_validate mode is a
# performance optimization that prevents validation from running after each
# change when assigning multile attributes.
unless Volt.in_mode?(:no_validate)
- 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 sync
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def sync
raise ".sync can only be used on the server" if Volt.client?
result = nil
error = 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 apply_inflections
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.apply_inflections(word, rules)
result = word.to_s.dup
if word.empty? || inflections.uncountables.include?(result.downcase[/\b\w+\Z/])
result
- 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 <=>
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def <=>(other)
if Time === other
to_f <=> other.to_f
else
r = other <=> self
- 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 parse_query
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def parse_query
query_hash = {}
qury = query
if qury
- 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 release_read_lock
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def release_read_lock
loop do
c = @counter.value
if @counter.compare_and_swap(c, c - 1)
# If one or more writers were waiting, and we were the last reader, wake a writer up
- 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"