Showing 840 of 1,637 total issues
Function _setContainment
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_setContainment: function() {
var over, c, ce,
o = this.options;
Function resize
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
resize: function( event ) {
var woset, hoset, isParent, isOffsetRelative,
that = $(this).data("ui-resizable"),
o = that.options,
co = that.containerOffset, cp = that.position,
Function _destroy
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_destroy: function() {
if ( this.xhr ) {
this.xhr.abort();
}
Function histogram
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.layout.histogram = function() {
var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges;
function histogram(data, i) {
var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;
while (++i < m) {
Function matcherFromTokens
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function matcherFromTokens( tokens ) {
var checkContext, matcher, j,
len = tokens.length,
leadingRelative = Expr.relative[ tokens[0].type ],
implicitRelative = leadingRelative || Expr.relative[" "],
Function resampleLineTo
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function resampleLineTo(x0, y0, λ0, a0, b0, c0, x1, y1, λ1, a1, b1, c1, depth, stream) {
Function Time
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
Rickshaw.Fixtures.Time = function() {
var self = this;
this.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
Open
def forwards(self, orm):
#
# Update Content types. Necessary for the polymorphic model migrations
#
- 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 show
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, show: function () {
var $tip
, inside
, pos
, actualWidth
Function refresh
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
refresh: function() {
var menus,
icon = this.options.icons.submenu,
submenus = this.element.find( this.options.menus );
Function _fnCreateTr
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnCreateTr ( oSettings, iRow )
{
var oData = oSettings.aoData[iRow];
var nTd;
Function _fnAddData
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnAddData ( oSettings, aDataSupplied )
{
var oCol;
/* Take an independent copy of the data source so we can bash it about as we wish */
Function create
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
R._engine.create = function () {
var con = R._getContainer.apply(0, arguments),
container = con && con.container,
x = con.x,
y = con.y,
Function d3_svg_line
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_svg_line(projection) {
var x = d3_geom_pointX, y = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;
function line(data) {
var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);
function segment() {
Function d3_geo_pathBuffer
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_geo_pathBuffer() {
var pointCircle = d3_geo_pathBufferCircle(4.5), buffer = [];
var stream = {
point: point,
lineStart: function() {
Function point
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
point: function(λ, φ) {
var point1 = [ λ, φ ], point2, v = visible(λ, φ), c = smallRadius ? v ? 0 : code(λ, φ) : v ? code(λ + (λ < 0 ? π : -π), φ) : 0;
if (!point0 && (v00 = v0 = v)) listener.lineStart();
if (v !== v0) {
point2 = intersect(point0, point1);
Function parseRows
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
dsv.parseRows = function(text, f) {
var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol;
function token() {
if (I >= N) return EOF;
if (eol) return eol = false, EOL;
Function _mouseDrag
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function(event) {
//Increase performance, avoid regex
var data,
el = this.helper, props = {},
Function set_up_html
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.set_up_html = function() {
var container_classes, container_props;
container_classes = ["chosen-container"];
container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
Function result_select
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.result_select = function(evt) {
var high, item, selected_index;
if (this.result_highlight) {
high = this.result_highlight;