Showing 92 of 4,113 total issues
Function Modernizr
has 605 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.Modernizr = (function( window, document, undefined ) {
var version = '2.8.3',
Modernizr = {},
Function Modernizr
has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring. Open
window.Modernizr = (function( window, document, undefined ) {
var version = '2.8.3',
Modernizr = {},
- 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
File modernizr.js
has 607 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Modernizr v2.8.3
* www.modernizr.com
*
* Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
Function Orbit
has 257 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Orbit = function (el, settings) {
// Don't reinitialize plugin
if (el.hasClass(settings.slides_container_class)) {
return this;
}
File foundation.js
has 466 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Foundation Responsive Library
* http://foundation.zurb.com
* Copyright 2015, ZURB
* Free to use under the MIT license.
File foundation.clearing.js
has 462 lines of code (exceeds 250 allowed). Consider refactoring. Open
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.clearing = {
name : 'clearing',
File foundation.topbar.js
has 454 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function ($, window, document, undefined) {
'use strict';
Foundation.libs.topbar = {
name: 'topbar',
Function events
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
events: function (bar) {
var self = this,
S = this.S;
S(this.scope)
File foundation.orbit.js
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
;(function ($, window, document, undefined) {
'use strict';
var noop = function () {};
Function events
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
events : function () {
var self = this,
S = self.S,
move_class = '',
right_postfix = '',
File foundation.reveal.js
has 398 lines of code (exceeds 250 allowed). Consider refactoring. Open
;(function ($, window, document, undefined) {
'use strict';
var openModals = [];
File foundation.dropdown.js
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.dropdown = {
name : 'dropdown',
File foundation.abide.js
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.abide = {
name : 'abide',
Function check_validation_and_apply_styles
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
check_validation_and_apply_styles : function (el_patterns) {
var i = el_patterns.length,
validations = [];
if (i == 0) {
return validations;
Function events
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
events : function (scope) {
var self = this,
S = self.S;
S(this.scope)
Method cancel
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def cancel
respond_to do |format|
refund = params.fetch(:refund, false).in? [true, 'true']
if @membership.cancel(refund)
if refund
- 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
Class User
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class User < ActiveRecord::Base
include Commerce::Purchaser
IMPORTABLE_ATTRIBUTES = %w(last_name first_name last_name address city state postal_code phone email member_since username).freeze
CSV_ATTRIBUTES = %w(id last_name first_name address city state postal_code phone email username member_since last_sign_in_at country).freeze
Method pick_em_button
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def pick_em_button(pick, *args)
opts = args.extract_options!
user = opts[:user] || h.current_user
team = model.send("#{pick}_team") if pick.in? %i(home away)
html_classes = ['choice', pick == :draw ? ['secondary'] : ['primary-bg', team.abbrv.downcase]].flatten
- 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 events
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
events : function (instance) {
var self = this,
S = self.S;
self.create(this.S(instance));
Method initialize
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def initialize(user)
alias_action :create, :read, :update, :destroy, to: :crud
if user
can :home, [User]
- 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"