Showing 316 of 336 total issues
File jquery-2.0.3.js
has 6037 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery JavaScript Library v2.0.3
* http://jquery.com/
*
* Includes Sizzle.js
File time_opal_patch.rb
has 590 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'corelib/comparable'
class Time
include Comparable
Function ajax
has 240 lines of code (exceeds 25 allowed). Consider refactoring. Open
ajax: function( url, options ) {
// If url is an object, simulate pre-1.5 signature
if ( typeof url === "object" ) {
options = url;
Function setDocument
has 200 lines of code (exceeds 25 allowed). Consider refactoring. Open
setDocument = Sizzle.setDocument = function( node ) {
var doc = node ? node.ownerDocument || node : preferredDoc,
parent = doc.defaultView;
// If no document and documentElement is available, return
Method strftime
has 184 lines of code (exceeds 25 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,
Class Time
has 42 methods (exceeds 20 allowed). Consider refactoring. Open
class Time
include Comparable
%x{
var days_of_week = #{%w[Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday]},
Function Callbacks
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.Callbacks = function( options ) {
// Convert options from String-formatted to Object-formatted if needed
// (we check in cache first)
options = typeof options === "string" ?
Consider simplifying this complex logical expression. Open
if ( event.pageX == null && original.clientX != null ) {
eventDoc = event.target.ownerDocument || document;
doc = eventDoc.documentElement;
body = eventDoc.body;
Class ArrayModel
has 34 methods (exceeds 20 allowed). Consider refactoring. Open
class ArrayModel < ReactiveArray
include ModelWrapper
include Models::Helpers::Base
include StateManager
include Models::Helpers::ArrayModel
Method add_linking_in_asset_path
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def add_linking_in_asset_path
app_path = @volt_app.app_path
@env.context_class.class_eval do
# We "freedom-patch" sprockets-helpers asset_path method to
# automatically link assets.
- 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 defaultPrefilter
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defaultPrefilter( elem, props, opts ) {
/* jshint validthis: true */
var prop, value, toggle, tween, hooks, oldfire,
anim = this,
orig = {},
Method save!
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def save!(&block)
# TODO: this shouldn't need to be run, but if no attributes are assigned, then
# if needs to be run. Maybe there's a better way to handle it.
validate!.then do
# Get errors from 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 included
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.included(base)
base.class_eval do
include Thor::Actions
desc 'model NAME COMPONENT', 'Creates a model named NAME in the component named COMPONENT'
Function Animation
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Animation( elem, properties, options ) {
var result,
stopped,
index = 0,
length = animationPrefilters.length,
Class VoltTime
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class VoltTime
COMMON_YEAR_DAYS_IN_MONTH = [nil, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
class << self
Class Model
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class Model
include LifecycleCallbacks
include ModelWrapper
include Models::Helpers::Base
include ModelHashBehaviour
Function trigger
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
trigger: function( event, data, elem, onlyHandlers ) {
var i, cur, tmp, bubbleType, ontype, handle, special,
eventPath = [ elem || document ],
type = core_hasOwn.call( event, "type" ) ? event.type : event,
Method update
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def update
# Find the true branch
true_template = nil
@branches.each do |branch|
value, template_name = branch
- 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 watch_and_resolve!
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def watch_and_resolve!(success, failure=nil, yield_nil_for_unresolved_promise=false)
# Keep results between runs
result = nil
computation = proc do |comp|
- 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_path
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def match_path(original_parts, remaining_parts, node)
# Take off the top part and get the rest into a new array
# part will be nil if we are out of parts (fancy how that works out, now
# stand in wonder about how much someone thought this through, though
# really I just got lucky)
- 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"