Showing 108 of 136 total issues
Function enableCssMediaQueries
has a Cognitive Complexity of 268 (exceeds 5 allowed). Consider refactoring. Open
Open
domReady(function enableCssMediaQueries(){
var _37;
var _38={LENGTH_UNIT:/[0-9]+(em|ex|px|in|cm|mm|pt|pc)$/,RESOLUTION_UNIT:/[0-9]+(dpi|dpcm)$/,ASPECT_RATIO:/^[0-9]+\/[0-9]+$/,ABSOLUTE_VALUE:/^[0-9]*(\.[0-9]+)*$/};
var _39=[];
var _3a=function(){
- 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 inputmask
has 864 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.inputmask = function (fn, options) {
var opts = $.extend(true, {}, $.inputmask.defaults, options);
var pasteEvent = isInputEventSupported('paste') ? 'paste' : 'input';
var iphone = navigator.userAgent.match(/iphone/i) != null;
Function cssHelper
has a Cognitive Complexity of 185 (exceeds 5 allowed). Consider refactoring. Open
Open
var cssHelper=function(){
var _3={BLOCKS:/[^\s{][^{]*\{(?:[^{}]*\{[^{}]*\}[^{}]*|[^{}]*)*\}/g,BLOCKS_INSIDE:/[^\s{][^{]*\{[^{}]*\}/g,DECLARATIONS:/[a-zA-Z\-]+[^;]*:[^;]+;/g,RELATIVE_URLS:/url\(['"]?([^\/\)'"][^:\)'"]+)['"]?\)/g,REDUNDANT_COMPONENTS:/(?:\/\*([^*\\\\]|\*(?!\/))+\*\/|@import[^;]+;)/g,REDUNDANT_WHITESPACE:/\s*(,|:|;|\{|\})\s*/g,MORE_WHITESPACE:/\s{2,}/g,FINAL_SEMICOLONS:/;\}/g,NOT_WHITESPACE:/\S+/g};
var _4,_5=false;
var _6=[];
var _7=function(fn){
- 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 mask
has 455 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function mask(el) {
var $input = $(el);
if (!$input.is(":input")) return;
//correct greedy setting if needed
File jquery.inputmask.js
has 915 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @license Input Mask plugin for jquery
* http://github.com/RobinHerbots/jquery.inputmask
* Copyright (c) 2010 - 2012 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
File backbone.js
has 856 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Backbone.js 0.9.2
// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
Function cssHelper
has 412 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var cssHelper=function(){
var _3={BLOCKS:/[^\s{][^{]*\{(?:[^{}]*\{[^{}]*\}[^{}]*|[^{}]*)*\}/g,BLOCKS_INSIDE:/[^\s{][^{]*\{[^{}]*\}/g,DECLARATIONS:/[a-zA-Z\-]+[^;]*:[^;]+;/g,RELATIVE_URLS:/url\(['"]?([^\/\)'"][^:\)'"]+)['"]?\)/g,REDUNDANT_COMPONENTS:/(?:\/\*([^*\\\\]|\*(?!\/))+\*\/|@import[^;]+;)/g,REDUNDANT_WHITESPACE:/\s*(,|:|;|\{|\})\s*/g,MORE_WHITESPACE:/\s{2,}/g,FINAL_SEMICOLONS:/;\}/g,NOT_WHITESPACE:/\S+/g};
var _4,_5=false;
var _6=[];
var _7=function(fn){
File css3-mediaqueries.js
has 777 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
if(typeof Object.create!=="function"){
Object.create=function(o){
function F(){
};
F.prototype=o;
File underscore.js
has 700 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Underscore.js 1.3.3
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the MIT license.
// Portions of Underscore are inspired or borrowed from Prototype,
// Oliver Steele's Functional, and John Resig's Micro-Templating.
Function enableCssMediaQueries
has 287 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
domReady(function enableCssMediaQueries(){
var _37;
var _38={LENGTH_UNIT:/[0-9]+(em|ex|px|in|cm|mm|pt|pc)$/,RESOLUTION_UNIT:/[0-9]+(dpi|dpcm)$/,ASPECT_RATIO:/^[0-9]+\/[0-9]+$/,ABSOLUTE_VALUE:/^[0-9]*(\.[0-9]+)*$/};
var _39=[];
var _3a=function(){
Function _40
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var _40=function(_41,_42){
var l=_41.length;
var min=(_41.substring(0,4)==="min-");
var max=(!min&&_41.substring(0,4)==="max-");
if(_42!==null){
Function keydownEvent
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function keydownEvent(e) {
//Safari 5.1.x - modal dialog fires keypress twice workaround
skipKeyPressEvent = false;
var input = this, k = e.keyCode, pos = caret(input);
Consider simplifying this complex logical expression. Open
Open
if ($.fn.inputmask == undefined) {
$.inputmask = {
//options default
defaults: {
placeholder: "_",
Function keypressEvent
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function keypressEvent(e) {
//Safari 5.1.x - modal dialog fires keypress twice workaround
if (skipKeyPressEvent) return false;
skipKeyPressEvent = true;
Function init
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function(){
var route = new Routes();
Backbone.history.start();
$(".chzn-select").chosen({no_results_text: "Nenhum resultado"});
Function patchValueProperty
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function patchValueProperty(npt) {
var valueProperty;
if (Object.getOwnPropertyDescriptor)
valueProperty = Object.getOwnPropertyDescriptor(npt, "value");
if (valueProperty && valueProperty.get) {
Function checkVal
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function checkVal(input, buffer, clearInvalid, skipRadixHandling) {
var isRTL = $(input).data('inputmask')['isRTL'],
inputValue = truncateInput(input._valueGet(), isRTL).split('');
if (isRTL) { //align inputValue for RTL/numeric input
Class Campaign
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Campaign < ActiveRecord::Base
include AutoHtml
attr_accessible :description, :name, :user_id, :user_ids, :image,
:image_cache, :category_id, :target_ids, :influencer_ids, :short_url,
:email_text, :facebook_text, :twitter_text, :map_embed, :map_description,
Function eq
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function eq(a, b, stack) {
// Identical objects are equal. `0 === -0`, but they aren't identical.
// See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
if (a === b) return a !== 0 || 1 / a == 1 / b;
// A strict comparison is necessary because `null == undefined`.
Function _19
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var _19=function(el){
if(typeof el.cssHelperText!=="string"){
return;
}
var o={mediaQueryLists:[],rules:[],selectors:{},declarations:[],properties:{}};