Showing 679 of 1,357 total issues
Function _showDatepicker
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_showDatepicker: function(input) {
input = input.target || input;
if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
input = $('input', input.parentNode)[0];
if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
Function _showDatepicker
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_showDatepicker: function(input) {
input = input.target || input;
if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
input = $('input', input.parentNode)[0];
if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
Function _mouseDrag
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function(event) {
var self = this;
this.dragged = true;
if (this.options.disabled)
Function filter
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Sizzle.filter = function( expr, set, inplace, not ) {
var match, anyFound,
type, found, item, filter, left,
i, pass,
old = expr,
Function done
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function done( status, nativeStatusText, responses, headers ) {
// Called once
if ( state === 2 ) {
return;
Function filter
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Sizzle.filter = function( expr, set, inplace, not ) {
var match, anyFound,
old = expr,
result = [],
curLoop = set,
Function done
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function done( status, statusText, responses, headers ) {
// Called once
if ( state === 2 ) {
return;
Function _doKeyDown
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_doKeyDown: function(event) {
var inst = $.datepicker._getInst(event.target);
var handled = true;
var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
inst._keyEvent = true;
Function _doKeyDown
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_doKeyDown: function(event) {
var inst = $.datepicker._getInst(event.target);
var handled = true;
var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
inst._keyEvent = true;
Function _clickHandler
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_clickHandler: function( event, target ) {
var options = this.options;
if ( options.disabled ) {
return;
}
Function _clickHandler
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_clickHandler: function( event, target ) {
var options = this.options;
if ( options.disabled ) {
return;
}
Function dispatch
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
dispatch: function( event ) {
// Make a writable jQuery.Event from the native event object
event = jQuery.event.fix( event || window.event );
Function init
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function( selector, context, rootjQuery ) {
var match, elem, ret, doc;
// Handle $(""), $(null), or $(undefined)
if ( !selector ) {
Function init
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function( selector, context, rootjQuery ) {
var match, elem, ret, doc;
// Handle $(""), $(null), or $(undefined)
if ( !selector ) {
Method notify
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
Open
def notify(event, *event_parameters)
unless BuilderPlugin.known_event? event
raise "You attempted to notify the project of the #{event} event, but the plugin architecture does not understand this event. Add a method to BuilderPlugin, and document it."
end
- 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 _Deferred
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_Deferred: function() {
var // callbacks list
callbacks = [],
// stored [ context , args ]
fired,
Function liveHandler
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function liveHandler( event ) {
var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
elems = [],
selectors = [],
events = jQuery._data( this, "events" );
Function _mouseStart
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseStart: function(event, overrideHandle, noActivation) {
var o = this.options, self = this;
this.currentContainer = this;
Function _mouseStart
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseStart: function(event, overrideHandle, noActivation) {
var o = this.options, self = this;
this.currentContainer = this;
Method glyphs_textile
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
Open
def glyphs_textile( text, level = 0 )
if text !~ HASTAG_MATCH
pgl text
footnote_ref text
else
- 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"