Showing 316 of 336 total issues
Method check_params_match
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def check_params_match(test_params, param_matcher)
param_matcher.each_pair do |key, value|
if value.is_a?(Hash)
if test_params[key]
result = check_params_match(test_params[key], value)
- 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
Function _watch
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _watch = function (elements, props, options, callback){
// Setup
var self = this;
var check;
File array_model.rb
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'volt/reactive/reactive_array'
require 'volt/models/model_wrapper'
require 'volt/models/helpers/base'
require 'volt/models/state_manager'
require 'volt/models/helpers/array_model'
Function superMatcher
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
superMatcher = function( seed, context, xml, results, expandContext ) {
var elem, j, matcher,
setMatched = [],
matchedCount = 0,
i = "0",
Class ArrayStore
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class ArrayStore < Store
include StoreState
@@query_pool = QueryListenerPool.new
Method listen
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def listen
loop do
begin
while (message = @message_encoder.receive_message(@socket))
break if @disconnected
- 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
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def parse
loop do
if last && SPECIAL[last]
# In a script or style tag, just look for the first end
close_tag = "</#{last}>"
- 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 class_at_path
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def class_at_path(path)
if path
# remove the _ and then singularize/pluralize
if path.last == :[]
index = -2
- 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
Function Deferred
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Deferred: function( func ) {
var tuples = [
// action, add listener, listener list, final state
[ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
[ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
Function CHILD
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
"CHILD": function( type, what, argument, first, last ) {
var simple = type.slice( 0, 3 ) !== "nth",
forward = type.slice( -4 ) !== "last",
ofType = what === "of-type";
Consider simplifying this complex logical expression. Open
if ( forward && useCache ) {
// Seek `elem` from a previously-cached index
outerCache = parent[ expando ] || (parent[ expando ] = {});
cache = outerCache[ type ] || [];
nodeIndex = cache[0] === dirruns && cache[1];
Class VoltTime
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class VoltTime
# Since VoltTime is required by the user, we don't add it to the FIELD_CASTS
# list until after it is included, since we don't have access to the class
# here.
if defined?(Volt::FieldHelpers)
Function support
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.support = (function( support ) {
var input = document.createElement("input"),
fragment = document.createDocumentFragment(),
div = document.createElement("div"),
select = document.createElement("select"),
Method changed
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def changed(attribute_name = nil)
path = @model.path
promise = Promise.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
Function ajaxConvert
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ajaxConvert( s, response, jqXHR, isSuccess ) {
var conv2, current, conv, tmp, prev,
converters = {},
// Work with a copy of dataTypes in case we need to modify it for conversion
dataTypes = s.dataTypes.slice();
Function init
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function( selector, context, rootjQuery ) {
var match, elem;
// HANDLE: $(""), $(null), $(undefined), $(false)
if ( !selector ) {
Function domManip
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
domManip: function( args, callback, allowIntersection ) {
// Flatten any nested arrays
args = core_concat.apply( [], args );
Method run_permissions
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def run_permissions(action_name = nil)
compute_allow_and_deny(action_name).then do
errors = {}
- 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 proxy_with_load
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def self.proxy_with_load(*method_names)
imethods = instance_methods(false)
method_names.each do |method_name|
# Sometimes we want to alias a method_missing method, so we use super
# instead to call it, if its not defined locally.
- 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 add_binding
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def add_binding(content)
content = content.strip
index = content.index(/[ \(]/)
if index
first_symbol = content[0...index]
- 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"