estimancy/projestimate

View on GitHub

Showing 1,675 of 1,675 total issues

Function toJSON has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    toJSON: function(type) {
      type = type || "tree";
      if(type == 'tree') {
        var ans = {};
        var rootNode = this.graph.getNode(this.root);
Severity: Minor
Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

        'render': function(node, canvas, animating){
          var leaf = this.viz.leaf(node),
              config = this.config,
              offst = config.offset,
              titleHeight = config.titleHeight,
    Severity: Minor
    Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

      Function normalizeDims has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        normalizeDims: function() {
          //number of elements
          var root = this.delegate.graph.getNode(this.delegate.root), l=0;
          root.eachAdjacency(function() {
            l++;
      Severity: Minor
      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

        Function calculateOrientation has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    calculateOrientation = function(sourceId, targetId, sd, td, sourceAnchor, targetAnchor) {
                
                        if (sourceId === targetId) return {
                            orientation:Orientation.IDENTITY,
                            a:["top", "top"]
        Severity: Minor
        Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

          Function Datepicker has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var Datepicker = function(element, options) {
                  var that = this;
          
                  this._process_options(options);
          
          
          Severity: Minor
          Found in app/assets/javascripts/bootstrap-datepicker.js - About 1 hr to fix

            Method generate_wbs_project_elt_tree has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def generate_wbs_project_elt_tree(element, tree, show_hidden=false, is_project_show_view=false)
                #Root is always display
                gap = 2.5
                tree ||= String.new
                unless element.nil?
            Severity: Minor
            Found in app/helpers/wbs_activity_elements_helper.rb - About 1 hr to fix

              Method display_effort_balancing_output has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def display_effort_balancing_output(module_project)
                  pbs_project_element = @pbs_project_element || current_component
                  res = String.new
                  if module_project.compatible_with(current_component.work_element_type.alias) || current_component
                    pemodule = Pemodule.find(module_project.pemodule.id)
              Severity: Minor
              Found in app/helpers/projects_helper.rb - About 1 hr to fix

                Function animationLoop has 13 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    function animationLoop(config, drawScale, drawData, ctx, clrx, clry, clrwidth, clrheight, midPosX, midPosY, borderX, borderY, data) {
                Severity: Major
                Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

                  Function AbstractSvgArrowOverlay has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      var AbstractSvgArrowOverlay = function(superclass, originalArgs) {
                          superclass.apply(this, originalArgs);
                          jsPlumb.jsPlumbUIComponent.apply(this, originalArgs);
                          this.isAppendedAtTopLevel = false;
                          var self = this, path = null;
                  Severity: Minor
                  Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

                    Function inputToRGB has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function inputToRGB(color) {
                    
                            var rgb = { r: 0, g: 0, b: 0 };
                            var a = 1;
                            var ok = false;
                    Severity: Minor
                    Found in app/assets/javascripts/spectrum.js - About 1 hr to fix

                      Function drawScale has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function drawScale() {
                      
                                  //X axis line                                                          
                      
                                  ctx.lineWidth = config.scaleLineWidth;
                      Severity: Minor
                      Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

                        Function saveCanvas has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function saveCanvas(ctx,data,config,tpgraph) {
                                cvSave = ctx.getImageData(0,0,ctx.canvas.width, ctx.canvas.height);
                        
                                var saveCanvasConfig = {
                                  savePng : false,
                        Severity: Minor
                        Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

                          Function drawScale has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  function drawScale() {
                          
                                      //X axis line                                                          
                          
                                      ctx.lineWidth = config.scaleLineWidth;
                          Severity: Minor
                          Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

                            Method import_user has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              def import_user
                                sep = "#{params[:separator].blank? ? I18n.t(:general_csv_separator) : params[:separator]}"
                                error_count = 0
                                file = params[:file]
                                encoding = params[:encoding]
                            Severity: Minor
                            Found in app/controllers/organizations_controller.rb - About 1 hr to fix

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

                                              if (animPc >= 1) {
                                                  if (typeof (data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
                                                  else lgtxt = "";
                                              }
                              Severity: Major
                              Found in app/assets/javascripts/ChartNew.js and 5 other locations - About 1 hr to fix
                              app/assets/javascripts/ChartNew.js on lines 1559..1562
                              app/assets/javascripts/ChartNew.js on lines 2289..2292
                              app/assets/javascripts/ChartNew.js on lines 2603..2606
                              app/assets/javascripts/ChartNew.js on lines 3308..3311
                              app/assets/javascripts/ChartNew.js on lines 3583..3586

                              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 67.

                              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 6 locations. Consider refactoring.
                              Open

                                              if (animPc >= 1) {
                                                  if (typeof (data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
                                                  else lgtxt = "";
                                              }
                              Severity: Major
                              Found in app/assets/javascripts/ChartNew.js and 5 other locations - About 1 hr to fix
                              app/assets/javascripts/ChartNew.js on lines 1559..1562
                              app/assets/javascripts/ChartNew.js on lines 2289..2292
                              app/assets/javascripts/ChartNew.js on lines 2603..2606
                              app/assets/javascripts/ChartNew.js on lines 2954..2957
                              app/assets/javascripts/ChartNew.js on lines 3308..3311

                              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 67.

                              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 6 locations. Consider refactoring.
                              Open

                                              if (animationDecimal >= 1) {
                                                  if (typeof (data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
                                                  else lgtxt = "";
                                              }
                              Severity: Major
                              Found in app/assets/javascripts/ChartNew.js and 5 other locations - About 1 hr to fix
                              app/assets/javascripts/ChartNew.js on lines 2289..2292
                              app/assets/javascripts/ChartNew.js on lines 2603..2606
                              app/assets/javascripts/ChartNew.js on lines 2954..2957
                              app/assets/javascripts/ChartNew.js on lines 3308..3311
                              app/assets/javascripts/ChartNew.js on lines 3583..3586

                              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 67.

                              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 6 locations. Consider refactoring.
                              Open

                                              if (animPc >= 1) {
                                                  if (typeof (data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
                                                  else lgtxt = "";
                                              }
                              Severity: Major
                              Found in app/assets/javascripts/ChartNew.js and 5 other locations - About 1 hr to fix
                              app/assets/javascripts/ChartNew.js on lines 1559..1562
                              app/assets/javascripts/ChartNew.js on lines 2289..2292
                              app/assets/javascripts/ChartNew.js on lines 2603..2606
                              app/assets/javascripts/ChartNew.js on lines 2954..2957
                              app/assets/javascripts/ChartNew.js on lines 3583..3586

                              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 67.

                              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 6 locations. Consider refactoring.
                              Open

                                              if (animPc >= 1) {
                                                  if (typeof (data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
                                                  else lgtxt = "";
                                              }
                              Severity: Major
                              Found in app/assets/javascripts/ChartNew.js and 5 other locations - About 1 hr to fix
                              app/assets/javascripts/ChartNew.js on lines 1559..1562
                              app/assets/javascripts/ChartNew.js on lines 2603..2606
                              app/assets/javascripts/ChartNew.js on lines 2954..2957
                              app/assets/javascripts/ChartNew.js on lines 3308..3311
                              app/assets/javascripts/ChartNew.js on lines 3583..3586

                              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 67.

                              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 6 locations. Consider refactoring.
                              Open

                                              if (animPc >= 1) {
                                                  if (typeof (data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
                                                  else lgtxt = "";
                                              }
                              Severity: Major
                              Found in app/assets/javascripts/ChartNew.js and 5 other locations - About 1 hr to fix
                              app/assets/javascripts/ChartNew.js on lines 1559..1562
                              app/assets/javascripts/ChartNew.js on lines 2289..2292
                              app/assets/javascripts/ChartNew.js on lines 2954..2957
                              app/assets/javascripts/ChartNew.js on lines 3308..3311
                              app/assets/javascripts/ChartNew.js on lines 3583..3586

                              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 67.

                              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