Showing 357 of 7,143 total issues
Function _create
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
this.activeMenu = this.element;
this.element
.uniqueId()
.addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
Function widget
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
namespace = name.split( "." )[ 0 ];
name = name.split( "." )[ 1 ];
Function formatDate
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
formatDate: function (format, date, settings) {
if (!date)
return '';
var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
Function removePane
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, removePane = function (evt_or_pane, remove, skipResize, destroyChild) {
if (!isInitialized()) return;
var pane = evtPane.call(this, evt_or_pane)
, $P = $Ps[pane]
, $C = $Cs[pane]
Function buildQuery
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
Open
buildQuery() {
var self = this;
var results = this.result.resultQuery.result;
var es_final = {};
- 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 _mouseDrag
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function(event) {
var that = this;
this.dragged = true;
if (this.options.disabled)
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 _open
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_open: function( event, target, content ) {
var tooltip, events, delayedShow,
positionOption = $.extend( {}, this.options.position );
if ( !content ) {
Function close
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, close = function (evt_or_pane, force, noAnimation, skipCallback) {
var pane = evtPane.call(this, evt_or_pane);
if (pane === "center") return; // validate
// if pane has been initialized, but NOT the complete layout, close pane instantly
if (!state.initialized && $Ps[pane]) {
Function bounce
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.effects.effect.bounce = function( o, done ) {
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
// defaults:
Function _showDatepicker
has 64 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 getMappings
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getMappings(clearFlag) {
var self = this;
this.appbaseService
.getMappings()
.then(function(data) {
Function utf8Slice
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function utf8Slice (buf, start, end) {
end = Math.min(buf.length, end)
var res = []
var i = start
Function _create
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
var that = this,
options = this.options,
active = options.active,
locationHash = location.hash.substring( 1 );
Function _mouseStart
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseStart: function(event, overrideHandle, noActivation) {
var o = this.options;
this.currentContainer = this;
Function drag
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
drag: function(event, ui) {
var inst = $(this).data("draggable"), that = this;
var checkPos = function(o) {
Function _runCallbacks
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, _runCallbacks = function (evtName, pane, skipBoundEvents) {
var hasPane = pane && isStr(pane)
, s = hasPane ? state[pane] : state
, o = hasPane ? options[pane] : options
, lName = options.name
Function makePaneFit
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, makePaneFit = function (pane, isOpening, skipCallback, force) {
var o = options[pane]
, s = state[pane]
, c = _c[pane]
, $P = $Ps[pane]
Function getMappings
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getMappings() {
var self = this;
return new Promise((resolve, reject) => {
getRequest("/_mapping")
.then(function(res) {
Function explode
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.effects.effect.explode = function( o, done ) {
var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
cells = rows,
el = $( this ),