Showing 30 of 45 total issues
File jquery.fileupload.js
has 1077 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* jQuery File Upload Plugin 5.40.1
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
File jquery.ui.widget.js
has 403 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Widget 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
Method uploads_one
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def uploads_one(upload_name, options={})
default_options = {
default: false,
placeholder: false,
removable: true,
Function send
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function (_, completeCallback) {
form = $('<form style="display:none;"></form>');
form.attr('accept-charset', options.formAcceptCharset);
addParamChar = /\?/.test(options.url) ? '&' : '?';
// XDomainRequest only supports GET and POST:
Function _chunkedUpload
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_chunkedUpload: function (options, testOnly) {
options.uploadedBytes = options.uploadedBytes || 0;
var that = this,
file = options.files[0],
fs = file.size,
Method uploads_one
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
Open
def uploads_one(upload_name, options={})
default_options = {
default: false,
placeholder: false,
removable: true,
- 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 uploads_many
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def uploads_many(upload_name, options={})
default_options = {
default: false,
placeholder: false,
removable: true,
Function _onSend
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onSend: function (e, data) {
if (!data.submit) {
this._addConvenienceMethods(e, data);
}
var that = this,
Function widget
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
// proxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
proxiedPrototype = {},
Function _onAdd
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onAdd: function (e, data) {
var that = this,
result = true,
options = $.extend({}, this.options, data),
files = data.files,
Function _initXHRData
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_initXHRData: function (options) {
var that = this,
formData,
file = options.files[0],
// Ignore non-multipart setting if not supported:
Method uploads_many
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
Open
def uploads_many(upload_name, options={})
default_options = {
default: false,
placeholder: false,
removable: true,
- 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 _addConvenienceMethods
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_addConvenienceMethods: function (e, data) {
var that = this,
getPromise = function (args) {
return $.Deferred().resolveWith(that, args).promise();
};
Function send
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function (data) {
if (data && !this.options.disabled) {
if (data.fileInput && !data.files) {
var that = this,
dfd = $.Deferred(),
Function send
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function (_, completeCallback) {
counter += 1;
var message = {
id: 'postmessage-transport-' + counter
},
Method uploads_one
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def uploads_one(upload_name, options={})
upload_model_class = "Uploadbox::#{@object.class.base_class.to_s + upload_name.to_s.camelize}".constantize
if upload_model_class.versions.present?
options.reverse_merge!(preview: upload_model_class.versions.keys.first,
Function send
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send = function () {
that._sending += 1;
// Set timer for bitrate progress calculation:
options._bitrateTimer = new that._BitrateTimer();
jqXHR = jqXHR || (
Function bridge
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget.bridge = function( name, object ) {
var fullName = object.prototype.widgetFullName || name;
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string",
args = slice.call( arguments, 1 ),
Function _on
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_on: function( suppressDisabledCheck, element, handlers ) {
var delegateElement,
instance = this;
// no suppressDisabledCheck flag, shuffle arguments
Function v1
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function v1(options, buf, offset) {
var i = buf && offset || 0;
var b = buf || [];
options = options || {};