Showing 2,136 of 3,976 total issues
Function puff
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return $.effects.effect.puff = function( o, done ) {
var elem = $( this ),
mode = $.effects.setMode( elem, o.mode || "hide" ),
hide = mode === "hide",
percent = parseInt( o.percent, 10 ) || 150,
Function _destroy
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_destroy: function() {
// Destroy (sub)menus
this.element
.removeAttr( "aria-activedescendant" )
.find( ".ui-menu" ).addBack()
Function _getWH
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_getWH : function() {
var $container = this.$( 'container' ),
$target = this.$( 'target' ),
self = this,
Function assertions
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var assertions = function() {
var expected = [
"topSuite beforeEach",
"outer beforeEach",
"outer it 1",
Function removeTag
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
removeTag: function(tag, animate, removeOnly) {
var that = this;
if (this.options.pruneTags && !removeOnly) {
that.pruneTag(tag)
Function blankInputs
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
blankInputs: function(form, specifiedSelector, nonBlank) {
var foundInputs = $(),
input,
valueToCheck,
radiosForNameWithNoneSelected,
Function assertions
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var assertions = function() {
var expected = [
'topSuite beforeEach',
'outer beforeEach',
'outer it 2',
Function _mouseDrag
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function(event) {
var data, props,
smp = this.originalMousePosition,
a = this.axis,
Function _createWidget
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_createWidget: function( options, element ) {
element = $( element || this.defaultElement || this )[ 0 ];
this.element = $( element );
this.uuid = widget_uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
Function puff
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var effectPuff = $.effects.effect.puff = function( o, done ) {
var elem = $( this ),
mode = $.effects.setMode( elem, o.mode || "hide" ),
hide = mode === "hide",
percent = parseInt( o.percent, 10 ) || 150,
Function _create
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
var selectees,
that = this;
this.element.addClass("ui-selectable");
Function _createOverlay
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_createOverlay: function() {
if ( !this.options.modal ) {
return;
}
Function _initSource
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_initSource: function() {
var array, url,
that = this;
if ( $.isArray( this.options.source ) ) {
array = this.options.source;
Function values
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
values: function( index, newValue ) {
var vals,
newValues,
i;
Function _destroy
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_destroy: function() {
// Destroy (sub)menus
this.element
.removeAttr( "aria-activedescendant" )
.find( ".ui-menu" ).addBack()
Function transfer
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var effectTransfer = $.effects.effect.transfer = function( o, done ) {
var elem = $( this ),
target = $( o.to ),
targetFixed = target.css( "position" ) === "fixed",
body = $("body"),
Function highlight
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var effectHighlight = $.effects.effect.highlight = function( o, done ) {
var elem = $( this ),
props = [ "backgroundImage", "backgroundColor", "opacity" ],
mode = $.effects.setMode( elem, o.mode || "show" ),
animation = {
Function getJasmineRequireObj
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
var getJasmineRequireObj = (function (jasmineGlobal) {
var jasmineRequire;
if (typeof module !== 'undefined' && module.exports && typeof exports !== 'undefined') {
if (typeof global !== 'undefined') {
- 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 toHaveBeenCalledWith
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
getJasmineRequireObj().toHaveBeenCalledWith = function(j$) {
var getErrorMsg = j$.formatErrorMsg('<toHaveBeenCalledWith>', 'expect(<spyObj>).toHaveBeenCalledWith(...arguments)');
function toHaveBeenCalledWith(util, customEqualityTesters) {
- 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 handleInteractionStart
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handleInteractionStart: function(ev) {
var subjectEl = this.subjectEl;
var subjectRect;
var origPoint;
var point;