HerbCSO/ticketeer

View on GitHub

Showing 292 of 292 total issues

File raphael.js has 5645 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// ┌────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël 2.1.2 - JavaScript Vector Library                          │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com)    │ \\
// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com)              │ \\
Severity: Major
Found in app/assets/javascripts/raphael.js - About 2 wks to fix

    File morris.js has 1622 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (function() {
      var $, Morris, minutesSpecHelper, secondsSpecHelper,
        __slice = [].slice,
        __hasProp = {}.hasOwnProperty,
        __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    Severity: Major
    Found in app/assets/javascripts/morris.js - About 4 days to fix

      Function Grid has 422 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        Morris.Grid = (function(_super) {
      
          __extends(Grid, _super);
      
          function Grid(options) {
      Severity: Major
      Found in app/assets/javascripts/morris.js - About 2 days to fix

        Function Line has 383 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          Morris.Line = (function(_super) {
        
            __extends(Line, _super);
        
            function Line(options) {
        Severity: Major
        Found in app/assets/javascripts/morris.js - About 1 day to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                      if (rgb[5]) {
                          values = rgb[5][split](commaSpaces);
                          red = toFloat(values[0]);
                          values[0].slice(-1) == "%" && (red *= 2.55);
                          green = toFloat(values[1]);
          Severity: Major
          Found in app/assets/javascripts/raphael.js and 1 other location - About 1 day to fix
          app/assets/javascripts/raphael.js on lines 1324..1336

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 307.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                      if (rgb[6]) {
                          values = rgb[6][split](commaSpaces);
                          red = toFloat(values[0]);
                          values[0].slice(-1) == "%" && (red *= 2.55);
                          green = toFloat(values[1]);
          Severity: Major
          Found in app/assets/javascripts/raphael.js and 1 other location - About 1 day to fix
          app/assets/javascripts/raphael.js on lines 1311..1323

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 307.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Consider simplifying this complex logical expression.
          Open

                  if (params.opacity != null || 
                      params["stroke-width"] != null ||
                      params.fill != null ||
                      params.src != null ||
                      params.stroke != null ||
          Severity: Critical
          Found in app/assets/javascripts/raphael.js - About 1 day to fix

            Function setFillAndStroke has 248 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                setFillAndStroke = function (o, params) {
                    var node = o.node,
                        attrs = o.attrs,
                        vis = node.style.visibility;
                    node.style.visibility = "hidden";
            Severity: Major
            Found in app/assets/javascripts/raphael.js - About 1 day to fix

              Function setFillAndStroke has 212 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  setFillAndStroke = function (o, params) {
                      // o.paper.canvas.style.display = "none";
                      o.attrs = o.attrs || {};
                      var node = o.node,
                          a = o.attrs,
              Severity: Major
              Found in app/assets/javascripts/raphael.js - About 1 day to fix

                Function Bar has 206 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  Morris.Bar = (function(_super) {
                
                    __extends(Bar, _super);
                
                    function Bar(options) {
                Severity: Major
                Found in app/assets/javascripts/morris.js - About 1 day to fix

                  Function runAnimation has 194 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function runAnimation(anim, element, percent, status, totalOrigin, times) {
                          percent = toFloat(percent);
                          var params,
                              isInAnim,
                              isInAnimSet,
                  Severity: Major
                  Found in app/assets/javascripts/raphael.js - About 7 hrs to fix

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                            for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {
                                var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));
                                this.attrs[key] = params[key];
                                for (var subkey in par) if (par[has](subkey)) {
                                    params[subkey] = par[subkey];
                    Severity: Major
                    Found in app/assets/javascripts/raphael.js and 1 other location - About 6 hrs to fix
                    app/assets/javascripts/raphael.js on lines 7775..7781

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 161.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                                for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {
                                    var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));
                                    this.attrs[key] = params[key];
                                    for (var subkey in par) if (par[has](subkey)) {
                                        params[subkey] = par[subkey];
                    Severity: Major
                    Found in app/assets/javascripts/raphael.js and 1 other location - About 6 hrs to fix
                    app/assets/javascripts/raphael.js on lines 6800..6806

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 161.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                                for (var i = 0, ii = names.length; i < ii; i++) {
                                    name = names[i];
                                    if (name in this.attrs) {
                                        out[name] = this.attrs[name];
                                    } else if (R.is(this.paper.customAttributes[name], "function")) {
                    Severity: Major
                    Found in app/assets/javascripts/raphael.js and 1 other location - About 6 hrs to fix
                    app/assets/javascripts/raphael.js on lines 6772..6781

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 156.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                                for (var i = 0, ii = names.length; i < ii; i++) {
                                    name = names[i];
                                    if (name in this.attrs) {
                                        out[name] = this.attrs[name];
                                    } else if (R.is(this.paper.customAttributes[name], "function")) {
                    Severity: Major
                    Found in app/assets/javascripts/raphael.js and 1 other location - About 6 hrs to fix
                    app/assets/javascripts/raphael.js on lines 7746..7755

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 156.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Function Donut has 143 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      Morris.Donut = (function(_super) {
                    
                        __extends(Donut, _super);
                    
                        Donut.prototype.defaults = {
                    Severity: Major
                    Found in app/assets/javascripts/morris.js - About 5 hrs to fix

                      Function addArrow has 137 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          addArrow = function (o, value, isEnd) {
                              if (o.type == "path") {
                                  var values = Str(value).toLowerCase().split("-"),
                                      p = o.paper,
                                      se = isEnd ? "end" : "start",
                      Severity: Major
                      Found in app/assets/javascripts/raphael.js - About 5 hrs to fix

                        Function setData has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            Grid.prototype.setData = function(data, redraw) {
                              var e, idx, index, maxGoal, minGoal, ret, row, step, total, y, ykey, ymax, ymin, yval;
                              if (redraw == null) {
                                redraw = true;
                              }
                        Severity: Major
                        Found in app/assets/javascripts/morris.js - About 5 hrs to fix

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  if (name == null) {
                                      var res = {};
                                      for (var a in this.attrs) if (this.attrs[has](a)) {
                                          res[a] = this.attrs[a];
                                      }
                          Severity: Major
                          Found in app/assets/javascripts/raphael.js and 1 other location - About 5 hrs to fix
                          app/assets/javascripts/raphael.js on lines 7731..7739

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 138.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  if (name == null) {
                                      var res = {};
                                      for (var a in this.attrs) if (this.attrs[has](a)) {
                                          res[a] = this.attrs[a];
                                      }
                          Severity: Major
                          Found in app/assets/javascripts/raphael.js and 1 other location - About 5 hrs to fix
                          app/assets/javascripts/raphael.js on lines 6754..6762

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 138.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Severity
                          Category
                          Status
                          Source
                          Language