opsforgeio/cabot

View on GitHub

Showing 840 of 1,637 total issues

Function d3_xhr has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function d3_xhr(url, mimeType, response, callback) {
    var xhr = {}, dispatch = d3.dispatch("beforesend", "progress", "load", "error"), headers = {}, request = new XMLHttpRequest(), responseType = null;
    if (d3_window.XDomainRequest && !("withCredentials" in request) && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest();
    "onload" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() {
      request.readyState > 3 && respond();
Severity: Major
Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

    Function graticule has 72 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      d3.geo.graticule = function() {
        var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5;
        function graticule() {
          return {
            type: "MultiLineString",
    Severity: Major
    Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

      Function d3_geom_voronoiConnectEdge has 72 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function d3_geom_voronoiConnectEdge(edge, extent) {
          var vb = edge.b;
          if (vb) return true;
          var va = edge.a, x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], lSite = edge.l, rSite = edge.r, lx = lSite.x, ly = lSite.y, rx = rSite.x, ry = rSite.y, fx = (lx + rx) / 2, fy = (ly + ry) / 2, fm, fb;
          if (ry === ly) {
      Severity: Major
      Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

        Function _fnInitialise has 71 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function _fnInitialise ( oSettings )
            {
              var i, iLen, iAjaxStart=oSettings.iInitDisplayStart;
        
              /* Ensure that the table data is fully initialised */
        Severity: Major
        Found in cabot/static/theme/js/jquery.dataTables.min.js - About 2 hrs to fix

          Function d3_svg_area has 71 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function d3_svg_area(projection) {
              var x0 = d3_geom_pointX, x1 = d3_geom_pointX, y0 = 0, y1 = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = "L", tension = .7;
              function area(data) {
                var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() {
                  return x;
          Severity: Major
          Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

            Function quadtree has 71 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function quadtree(data) {
                  var d, fx = d3_functor(x), fy = d3_functor(y), xs, ys, i, n, x1_, y1_, x2_, y2_;
                  if (x1 != null) {
                    x1_ = x1, y1_ = y1, x2_ = x2, y2_ = y2;
                  } else {
            Severity: Major
            Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

              Function Annotate has 71 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Rickshaw.Graph.Annotate = function(args) {
              
                var graph = this.graph = args.graph;
                this.elements = { timeline: args.element };
              
              
              Severity: Major
              Found in cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

                Function matcherFromGroupMatchers has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
                  // A counter to specify which element is currently being matched
                  var matcherCachedRuns = 0,
                    bySet = setMatchers.length > 0,
                    byElement = elementMatchers.length > 0,
                Severity: Major
                Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 2 hrs to fix

                  Function _contactContainers has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _contactContainers: function(event) {
                          var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,
                              innermostContainer = null,
                              innermostIndex = null;
                  
                  
                  Severity: Major
                  Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

                    Function d3_geo_projectionMutator has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function d3_geo_projectionMutator(projectAt) {
                        var project, rotate, projectRotate, projectResample = d3_geo_resample(function(x, y) {
                          x = project(x, y);
                          return [ x[0] * k + δx, δy - x[1] * k ];
                        }), k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx, δy, preclip = d3_geo_clipAntimeridian, postclip = d3_identity, clipAngle = null, clipExtent = null, stream;
                    Severity: Major
                    Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

                      File 0001_initial.py has 282 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      # -*- coding: utf-8 -*-
                      import datetime
                      from south.db import db
                      from south.v2 import SchemaMigration
                      from django.db import models
                      Severity: Minor
                      Found in cabot/cabotapp/migrations/0001_initial.py - About 2 hrs to fix

                        Function getRGB has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            R.getRGB = cacher(function (colour) {
                                if (!colour || !!((colour = Str(colour)).indexOf("-") + 1)) {
                                    return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString};
                                }
                                if (colour == "none") {
                        Severity: Major
                        Found in cabot/static/arachnys/js/raphael.js - About 2 hrs to fix

                          Function axis has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function axis(g) {
                                g.each(function() {
                                  var g = d3.select(this);
                                  var scale0 = this.__chart__ || scale, scale1 = this.__chart__ = scale.copy();
                                  var ticks = tickValues == null ? scale1.ticks ? scale1.ticks.apply(scale1, tickArguments_) : scale1.domain() : tickValues, tickFormat = tickFormat_ == null ? scale1.tickFormat ? scale1.tickFormat.apply(scale1, tickArguments_) : d3_identity : tickFormat_, tick = g.selectAll(".tick").data(ticks, scale1), tickEnter = tick.enter().insert("g", ".domain").attr("class", "tick").style("opacity", ε), tickExit = d3.transition(tick.exit()).style("opacity", ε).remove(), tickUpdate = d3.transition(tick).style("opacity", 1), tickTransform;
                          Severity: Major
                          Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

                            Function render has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              render: function() {
                            
                                var self = this;
                            
                                this.svg = d3.select(this.element)
                            Severity: Major
                            Found in cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

                              Function _open has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _open: function( event, target, content ) {
                                      var tooltip, events, delayedShow,
                                          positionOption = $.extend( {}, this.options.position );
                              
                                      if ( !content ) {
                              Severity: Major
                              Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

                                Function insert has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    insert: function(after, node) {
                                      var parent, grandpa, uncle;
                                      if (after) {
                                        node.P = after;
                                        node.N = after.N;
                                Severity: Major
                                Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

                                  Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function done( status, nativeStatusText, responses, headers ) {
                                        var isSuccess, success, error, response, modified,
                                          statusText = nativeStatusText;
                                  
                                        // Called once
                                  Severity: Major
                                  Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 2 hrs to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if (res.type == "text") {
                                                res.paper.canvas.style.display = E;
                                                var span = res.paper.span,
                                                    m = 100,
                                                    fontSize = a.font && a.font.match(/\d+(?:\.\d*)?(?=px)/);
                                    Severity: Critical
                                    Found in cabot/static/arachnys/js/raphael.js - About 2 hrs to fix

                                      Function sparkline has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          $.fn.sparkline = function (userValues, userOptions) {
                                              return this.each(function () {
                                                  var options = new $.fn.sparkline.options(this, userOptions),
                                                       $this = $(this),
                                                       render, i;
                                      Severity: Major
                                      Found in cabot/static/theme/js/jquery.sparkline.min.js - About 2 hrs to fix

                                        Function touchstarted has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            function touchstarted() {
                                              var target = this, event_ = event.of(target, arguments), locations0 = {}, distance0 = 0, scale0, eventId = d3.event.changedTouches[0].identifier, touchmove = "touchmove.zoom-" + eventId, touchend = "touchend.zoom-" + eventId, w = d3.select(d3_window).on(touchmove, moved).on(touchend, ended), t = d3.select(target).on(mousedown, null).on(touchstart, started), dragRestore = d3_event_dragSuppress();
                                              d3_selection_interrupt.call(target);
                                              started();
                                              zoomstarted(event_);
                                        Severity: Major
                                        Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language