Showing 679 of 1,357 total issues
Consider simplifying this complex logical expression. Open
Open
if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
inst.snapElements[i].snapping = false;
continue;
}
Function _create
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
this.originalTitle = this.element.attr('title');
// #5742 - .attr() might return a DOMElement
if ( typeof this.originalTitle !== "string" ) {
this.originalTitle = "";
Function _create
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
this.originalTitle = this.element.attr('title');
// #5742 - .attr() might return a DOMElement
if ( typeof this.originalTitle !== "string" ) {
this.originalTitle = "";
Function clean
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
clean: function( elems, context, fragment, scripts ) {
var checkScriptType, script, j,
ret = [];
context = context || document;
Function trigger
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
trigger: function( event, data, elem, onlyHandlers ) {
// Don't do events on text and comment nodes
if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
return;
}
Function animate
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
animate: function( prop, speed, easing, callback ) {
var optall = jQuery.speed( speed, easing, callback );
if ( jQuery.isEmptyObject( prop ) ) {
return this.each( optall.complete, [ false ] );
Method block_textile_table
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
Open
def block_textile_table( text )
text.gsub!( TABLE_RE ) do |matches|
tatts, fullrow = $~[1..2]
tatts = pba( tatts, 'table' )
- 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 _create
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
var self = this, o = this.options;
this.element.addClass("ui-resizable");
Function _create
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
var self = this, o = this.options;
this.element.addClass("ui-resizable");
Method pba
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
Open
def pba( text_in, element = "" )
return '' unless text_in
style = []
- 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 _create
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
var self = this,
options = self.options;
self.running = 0;
Function _create
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
var self = this,
options = self.options;
self.running = 0;
Function send
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function( headers, complete ) {
// Get a new xhr
var xhr = s.xhr(),
handle,
Function send
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function( headers, complete ) {
// Get a new xhr
var xhr = s.xhr(),
handle,
Function callbacks
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var callbacks = function () {
// for string, boolean, number and null
function useStrictEquality(b, a) {
if (b instanceof a.constructor || a instanceof b.constructor) {
Function remove
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
remove: function( elem, types, handler, pos ) {
// don't do events on text and comment nodes
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
return;
}
Function doAnimation
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function doAnimation() {
// XXX 'this' does not always have a nodeName when running the
// test suite
if ( optall.queue === false ) {
Function _toggle
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_toggle: function( toShow, toHide, data, clickedIsActive, down ) {
var self = this,
options = self.options;
self.toShow = toShow;
Function _toggle
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_toggle: function( toShow, toHide, data, clickedIsActive, down ) {
var self = this,
options = self.options;
self.toShow = toShow;
Function size
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.effects.size = function(o) {
return this.queue(function() {
// Create element