Showing 840 of 1,637 total issues
Function X
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Rickshaw.Graph.Axis.X = function(args) {
var self = this;
var berthRate = 0.10;
Function fnSetColumnVis
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.fnSetColumnVis = function ( iCol, bShow, bRedraw )
{
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
var i, iLen;
var aoColumns = oSettings.aoColumns;
Function _registerMouseEvents
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
_registerMouseEvents: function() {
var element = d3.select(this.element);
var drag = {
- 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 _clear
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_clear: function(event, noPropagation) {
this.reverting = false;
// We delay all events that have to be triggered to after the point where the placeholder has been removed and
// everything else normalized again
Function $
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.$ = function ( sSelector, oOpts )
{
var i, iLen, a = [], tr;
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
var aoData = oSettings.aoData;
Function _pathToRelative
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pathToRelative = R._pathToRelative = function (pathArray) {
var pth = paths(pathArray);
if (pth.rel) {
return pathClone(pth.rel);
}
Function _fnSortAttachListener
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback )
{
_fnBindAction( nNode, {}, function (e) {
/* If the column is not sortable - don't to anything */
if ( oSettings.aoColumns[iDataIndex].bSortable === false )
Function d3_geo_resample
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_geo_resample(project) {
var δ2 = .5, cosMinDistance = Math.cos(30 * d3_radians), maxDepth = 16;
function resample(stream) {
return (maxDepth ? resampleRecursive : resampleNone)(stream);
}
Function albersUsa
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.geo.albersUsa = function() {
var lower48 = d3.geo.albers();
var alaska = d3.geo.conicEqualArea().rotate([ 154, 0 ]).center([ -2, 58.5 ]).parallels([ 55, 65 ]);
var hawaii = d3.geo.conicEqualArea().rotate([ 157, 0 ]).center([ -3, 19.9 ]).parallels([ 8, 18 ]);
var point, pointStream = {
Function Sizzle
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sizzle( selector, context, results, seed ) {
var match, elem, m, nodeType,
// QSA vars
i, groups, old, nid, newContext, newSelector;
Function _mouseStart
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseStart: function(event, overrideHandle, noActivation) {
var i, body,
o = this.options;
Function _mouseDrag
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function(event) {
var i, item, itemElement, intersection,
o = this.options,
scrolled = false;
Function _mouseDrag
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function(event) {
this.dragged = true;
if (this.options.disabled) {
Function Datepicker
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Datepicker() {
this._curInst = null; // The current instance in use
this._keyEvent = false; // If the last event was a key event
this._disabledInputs = []; // List of date picker inputs that have been disabled
this._datepickerShowing = false; // True if the popup picker is showing , false if not
Function d3_scale_ordinal
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_scale_ordinal(domain, ranger) {
var index, range, rangeBand;
function scale(x) {
return range[((index.get(x) || ranger.t === "range" && index.set(x, domain.push(x))) - 1) % range.length];
}
Function buildFragment
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildFragment: function( elems, context, scripts, selection ) {
var j, elem, contains,
tmp, tag, tbody, wrap,
l = elems.length,
Function _create
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
this.activeMenu = this.element;
// flag used to prevent firing of the click handler
// as the event bubbles up through nested menus
this.mouseHandled = false;
Function d3_locale_numberFormat
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_locale_numberFormat(locale) {
var locale_decimal = locale.decimal, locale_thousands = locale.thousands, locale_grouping = locale.grouping, locale_currency = locale.currency, formatGroup = locale_grouping ? function(value) {
var i = value.length, t = [], j = 0, g = locale_grouping[0];
while (i > 0 && g > 0) {
t.push(value.substring(i -= g, i + g));
Function add
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
add: function( elem, types, handler, data, selector ) {
var tmp, events, t, handleObjIn,
special, eventHandle, handleObj,
handlers, type, namespaces, origType,
elemData = jQuery._data( elem );
Function widget
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
// proxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
proxiedPrototype = {},