Showing 44 of 68 total issues
File backbone.js
has 929 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Backbone.js 1.0.0
// (c) 2010-2013 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
Function Modernizr
has a Cognitive Complexity of 112 (exceeds 5 allowed). Consider refactoring. Open
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 underscore.js
has 848 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Underscore.js 1.4.4
// http://underscorejs.org
// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore may be freely distributed under the MIT license.
Function Modernizr
has 379 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.Modernizr = (function( window, document, undefined ) {
var version = '2.8.3',
Modernizr = {},
Function filedrop
has 324 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.filedrop = function(options) {
var opts = $.extend({}, default_opts, options),
global_progress = [];
$(document).on('drop', this, drop).on('dragstart', this, opts.dragStart).on('dragenter',this, dragEnter).on('dragover', this, dragOver).on('dragleave', this, dragLeave);
File jquery.atwho.js
has 570 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
Implement Github like autocomplete mentions
http://ichord.github.com/At.js
File underscore.string.js
has 464 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Underscore.string
// (c) 2010 Esa-Matti Suuronen <esa-matti aet suuronen dot org>
// Underscore.string is freely distributable under the terms of the MIT license.
// Documentation: https://github.com/epeli/underscore.string
// Some code is borrowed from MooTools and Alexandru Marasteanu.
Function upload
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function upload() {
stop_loop = false;
if (!files) {
opts.error(errors[0]);
File modernizr.js
has 384 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* Modernizr 2.8.3 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-draganddrop-audio-touch-shiv-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-notification
*/
;
File jquery.filedrop.js
has 379 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*global jQuery:false, alert:false */
/*
* Default text - jQuery plugin for html5 dragging files from desktop to browser
*
Function toRelativeTime
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
Open
Date.prototype.toRelativeTime = (function() {
var _ = function(options) {
var opts = processOptions(options);
- 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 sprintf
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var sprintf = (function() {
function get_type(variable) {
return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase();
}
Function send
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var send = function(e) {
var fileIndex = ((typeof(e.srcElement) === "undefined") ? e.target : e.srcElement).index;
// Sometimes the index is not attached to the
Function process
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var process = function() {
var fileIndex;
if (stop_loop) {
Function eq
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var eq = function(a, b, aStack, bStack) {
// 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 toRelativeTime
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Date.prototype.toRelativeTime = (function() {
var _ = function(options) {
var opts = processOptions(options);
Function set
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
set: function(key, val, options) {
var attr, attrs, unset, changes, silent, changing, prev, current;
if (key == null) return this;
// Handle both `"key", value` and `{key: value}` -style arguments.
Function format
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
str_format.format = function(parse_tree, argv) {
var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length;
for (i = 0; i < tree_length; i++) {
node_type = get_type(parse_tree[i]);
if (node_type === 'string') {
Function set
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
set: function(models, options) {
options = _.defaults(options || {}, setOptions);
if (options.parse) models = this.parse(models, options);
if (!_.isArray(models)) models = models ? [models] : [];
var i, l, model, attrs, existing, sort;
Function parse
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
str_format.parse = function(fmt) {
var _fmt = fmt, match = [], parse_tree = [], arg_names = 0;
while (_fmt) {
if ((match = /^[^\x25]+/.exec(_fmt)) !== null) {
parse_tree.push(match[0]);