Showing 840 of 1,637 total issues
Function build
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
build: function() {
var element = this.element;
var graph = this.graph;
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function(args) {
args = args || {};
var graph = this.graph;
Function onclick
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
label.onclick = function(e){
var disableAllOtherLines = line.series.disabled;
if ( ! disableAllOtherLines ) {
for ( var i = 0; i < self.legend.lines.length; i++ ) {
Function fix
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fix: function( event ) {
if ( event[ jQuery.expando ] ) {
return event;
}
Function finish
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
finish: function( type ) {
if ( type !== false ) {
type = type || "fx";
}
return this.each(function() {
Function Annotate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
Rickshaw.Graph.Annotate = function(args) {
var graph = this.graph = args.graph;
this.elements = { timeline: args.element };
- 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 forwards
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
def forwards(self, orm):
"""
Plugin Data migrations are done in 0010. This will test that the
migrations passed correctly.
"""
- 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 updatePosition
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updatePosition: function (x, y) {
if (x === undefined) {
if (this.mousex === undefined) {
return;
}
Function refresh
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
refresh: function() {
//See #8237 & #8828
var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
if ( isDisabled !== this.options.disabled ) {
Function stop
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
stop: function( event ) {
var that = $(this).data("ui-resizable"),
o = that.options,
pr = that._proportionallyResizeElements,
ista = pr.length && (/textarea/i).test(pr[0].nodeName),
Function _updateVirtualBoundaries
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_updateVirtualBoundaries: function(forceAspectRatio) {
var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
o = this.options;
b = {
Function left
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
left: function( position, data ) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
outerWidth = within.width,
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
Function _setupHeightStyle
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_setupHeightStyle: function( heightStyle ) {
var maxHeight,
parent = this.element.parent();
if ( heightStyle === "fill" ) {
Function getDimensions
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getDimensions( elem ) {
var raw = elem[0];
if ( raw.nodeType === 9 ) {
return {
width: elem.width(),
Function _fnGetCellData
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnGetCellData( oSettings, iRow, iCol, sSpecific )
{
var sData;
var oCol = oSettings.aoColumns[iCol];
var oData = oSettings.aoData[iRow]._aData;
Function top
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
top: function( position, data ) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
outerHeight = data.within.height,
collisionPosTop = position.top - data.collisionPosition.marginTop,
Function setData
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var setData = function (data, val, src) {
var a = src.split('.'), b;
var arrayNotation, o, innerSrc;
for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ )
Function getDimensions
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getDimensions( elem ) {
var raw = elem[0];
if ( raw.nodeType === 9 ) {
return {
width: elem.width(),
Function top
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
top: function( position, data ) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
outerHeight = data.within.height,
collisionPosTop = position.top - data.collisionPosition.marginTop,
Function _getContainer
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
R._getContainer = function (x, y, w, h) {
var container;
container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x;
if (container == null) {
return;