Showing 336 of 336 total issues
Method strftime
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def strftime(format)
%x{
return format.replace(/%([\-_#^0]*:{0,2})(\d+)?([EO]*)(.)/g, function(full, flags, width, _, conv) {
var result = "",
zero = flags.indexOf('0') !== -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
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return compare & 4 ? -1 : 1;
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return ret;
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return this;
Avoid too many return
statements within this function. Open
return rootjQuery.ready( selector );
Avoid too many return
statements within this function. Open
return ret == null ?
undefined :
ret;
Avoid too many return
statements within this function. Open
return a.compareDocumentPosition ? -1 : 1;
Avoid too many return
statements within this function. Open
return select( selector.replace( rtrim, "$1" ), context, results, seed );
Avoid too many return
statements within this function. Open
return jQuery.makeArray( selector, this );
Avoid too many return
statements within this function. Open
return this.constructor( context ).find( selector );
Method create_controller_handler
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create_controller_handler(full_path, controller_path)
# If arguments is nil, then an blank SubContext will be created
args = [SubContext.new(@arguments, nil, true)]
# get the controller class and action
- 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 set_content_to_template
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def set_content_to_template(volt_app, template_name)
if self.is_a?(DomSection)
# DomTemplates are an optimization when working with the DOM (as opposed to other targets)
dom_template = (@@template_cache[template_name] ||= DomTemplate.new(volt_app, template_name))
- 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 get_controller_and_action
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.get_controller_and_action(controller_path)
fail "Invalid controller path: #{controller_path.inspect}" unless controller_path && controller_path.size > 0
action = controller_path[-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
Method initialize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def initialize(volt_app, target, context, binding_name, getter, variable_name, index_name, template_name)
super(volt_app, target, context, binding_name)
@item_name = variable_name
@index_name = index_name
- 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
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def update(value)
# Since we're checking things like size, we don't want this to be re-triggered on a
# size change, so we run without tracking.
Computation.run_without_tracking do
# Adjust to the new size
- 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 method_missing
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def method_missing(method_name, *args, &block)
method_name = method_name.to_sym
if @locals && @locals.key?(method_name)
obj = @locals[method_name]
- 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"