Showing 35 of 60 total issues
Function ajaxSubmit
has 492 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.ajaxSubmit = function(options) {
/*jshint scripturl:true */
// fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
if (!this.length) {
File jquery.form.js
has 767 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery Form Plugin
* version: 3.14 (30-JUL-2012)
* @requires jQuery v1.3.2 or later
*
Function populate
has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring. Open
Open
jQuery.fn.populate = function(obj, options) {
// ------------------------------------------------------------------------------------------
// JSON conversion 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 fileUploadIframe
has 337 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fileUploadIframe(a) {
var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
var useProp = !!$.fn.prop;
if ($(':input[name=submit],:input[id=submit]', form).length) {
Function populate
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.fn.populate = function(obj, options) {
// ------------------------------------------------------------------------------------------
// JSON conversion function
Function cb
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function cb(e) {
if (xhr.aborted || callbackProcessed) {
return;
}
try {
Consider simplifying this complex logical expression. Open
Open
if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
(t == 'checkbox' || t == 'radio') && !el.checked ||
(t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
tag == 'select' && el.selectedIndex == -1)) {
return null;
Function jtextarea
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.jtextarea = function(opt) {
var hmin=0;
var settings = {
File bootstrap-tour.js
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Generated by CoffeeScript 1.6.1
/* ============================================================
# bootstrap-tour.js v0.1
# http://pushly.github.com/bootstrap-tour/
Function doSubmit
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function doSubmit() {
// make sure form attrs are set
var t = $form.attr('target'), a = $form.attr('action');
// update form attrs in IE friendly way
Function populateFormElement
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function populateFormElement(form, name, value)
{
// check that the named element exists in the form
var name = getElementName(name); // handle non-php naming
Function formToArray
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.formToArray = function(semantic, elements) {
var a = [];
if (this.length === 0) {
return a;
}
Function deparam
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
Open
deparam: function(params){
if(! params) {
return {};
}
- 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 getParams
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getParams: function( convert ) {
var data = {},
current;
convert = convert === undefined ? false : convert;
Function initialize
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Filter.prototype.initialize = function() {
var _this = this;
this.form = _this.$target.find("form");
Function fileUploadXhr
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fileUploadXhr(a) {
var formdata = new FormData();
for (var i=0; i < a.length; i++) {
formdata.append(a[i].name, a[i].value);
Function parseJSON
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseJSON(obj, path)
{
// prepare
path = path || '';
Function _showPopover
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tour.prototype._showPopover = function(step, i) {
var content, nav, options, tip,
_this = this;
content = "" + step.content + "<br /><p>";
options = $.extend({}, this._options);
Function fieldValue
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fieldValue = function(el, successful) {
var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
if (successful === undefined) {
successful = true;
}
Function refresh
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Backlog.prototype.refresh = function(updateHistory, data) {
var _this = this;
var sorting = Sorting.instances[0];
var filter = Filter.instances[0];