estimancy/projestimate

View on GitHub

Showing 1,675 of 1,675 total issues

Function on_start_resize has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    fn.on_start_resize = function(event, ui) {
        this.$resized_widget = ui.$player.closest('.gs-w');
        this.resize_coords = this.$resized_widget.coords();
        this.resize_wgd = this.resize_coords.grid;
        this.resize_initial_width = this.resize_coords.coords.width;
Severity: Minor
Found in app/assets/javascripts/jquery.gridster.js - About 1 hr to fix

    Function toAbsolute has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            this.toAbsolute = function(base) {
                var base = new jscolor.URI(base);
                var r = this;
                var t = new jscolor.URI;
    
    
    Severity: Minor
    Found in app/assets/javascripts/jscolor.js - About 1 hr to fix

      Function on_stop_drag has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          fn.on_stop_drag = function(event, ui) {
              this.$helper.add(this.$player).add(this.$wrapper)
                  .removeClass('dragging');
      
              ui.position.left = ui.position.left + this.baseX;
      Severity: Minor
      Found in app/assets/javascripts/jquery.gridster.js - About 1 hr to fix

        Function redrawPad has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function redrawPad() {
                    // redraw the pad pointer
                    switch(modeID) {
                        case 0: var yComponent = 1; break;
                        case 1: var yComponent = 2; break;
        Severity: Minor
        Found in app/assets/javascripts/jscolor.js - About 1 hr to fix

          Function drawLabels has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function drawLabels() {
                      ctx.font = config.scaleFontStyle + " " + config.scaleFontSize + "px " + config.scaleFontFamily;
          
                      //X axis line                                                          
                      if(config.xAxisTop || config.xAxisBottom) {                                                    
          Severity: Minor
          Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

            Function drawLabels has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function drawLabels() {
                        ctx.font = config.scaleFontStyle + " " + config.scaleFontSize + "px " + config.scaleFontFamily;
            
                        //X axis line                                                          
            
            
            Severity: Minor
            Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

              Function drawLabels has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function drawLabels() {
                          ctx.font = config.scaleFontStyle + " " + config.scaleFontSize + "px " + config.scaleFontFamily;
              
                          //X axis line                                                          
                          if(config.xAxisTop || config.xAxisBottom) {                                                    
              Severity: Minor
              Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

                Function drawLabels has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        function drawLabels() {
                            ctx.font = config.scaleFontStyle + " " + config.scaleFontSize + "px " + config.scaleFontFamily;
                
                            //X axis labels                                                          
                
                
                Severity: Minor
                Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

                  Function drawLabels has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          function drawLabels() {
                              ctx.font = config.scaleFontStyle + " " + config.scaleFontSize + "px " + config.scaleFontFamily;
                  
                              //X Labels     
                              if(config.xAxisTop || config.xAxisBottom) {                                                    
                  Severity: Minor
                  Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

                    Method pemodule_input has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def pemodule_input(level, est_val, module_project, level_estimation_values, pbs_project_element, attribute_type="", read_only_value=false)
                    
                        est_val_pe_attribute = est_val.pe_attribute
                        if est_val_pe_attribute.attr_type == 'integer' or est_val_pe_attribute.attr_type == 'float'
                    
                    
                    Severity: Minor
                    Found in app/helpers/projects_helper.rb - About 1 hr to fix

                    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

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

                          var $this = $(this)
                            , data = $this.data('collapse')
                            , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
                    Severity: Major
                    Found in app/assets/javascripts/bootstrap.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/bootstrap.js on lines 1004..1006

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

                    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

                          var $this = $(this)
                            , data = $this.data('modal')
                            , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
                    Severity: Major
                    Found in app/assets/javascripts/bootstrap.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/bootstrap.js on lines 597..599

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

                    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 GuideLines has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        jsPlumb.Overlays.svg.GuideLines = function() {
                            var path = null, self = this, p1_1, p1_2;        
                            jsPlumb.Overlays.GuideLines.apply(this, arguments);
                            this.paint = function(params, containerExtents) {
                                if (path == null) {
                    Severity: Minor
                    Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

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

                                          v6 = fmtChartJS(config,100 * jsGraphAnnotate[ctx.canvas.id][i][8] / jsGraphAnnotate[ctx.canvas.id][i][10],config.fmtV6);                                  // v6=Percentage;
                      Severity: Major
                      Found in app/assets/javascripts/ChartNew.js and 2 other locations - About 1 hr to fix
                      app/assets/javascripts/ChartNew.js on lines 474..474
                      app/assets/javascripts/ChartNew.js on lines 510..510

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

                      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

                                      var eventArgs = {
                                          connection:jpc,
                                          source : jpc.source, target : jpc.target,
                                          sourceId : jpc.sourceId, targetId : jpc.targetId,
                                          sourceEndpoint : jpc.endpoints[0], targetEndpoint : jpc.endpoints[1]
                      Severity: Major
                      Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js and 1 other location - About 1 hr to fix
                      app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 2172..2177

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

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

                                      v6 = fmtChartJS(config,100 * jsGraphAnnotate[ctx.canvas.id][i][7] / jsGraphAnnotate[ctx.canvas.id][i][9],config.fmtV6);                                  // v6=Percentage;
                      Severity: Major
                      Found in app/assets/javascripts/ChartNew.js and 2 other locations - About 1 hr to fix
                      app/assets/javascripts/ChartNew.js on lines 438..438
                      app/assets/javascripts/ChartNew.js on lines 510..510

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

                      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

                          $("#user_id").change(
                                  function () {
                                    $.ajax({ url:'/load_security_for_selected_user',
                                      data:'user_id=' + this.value + '&project_id=' + $('#project_id').val()
                                    })
                      Severity: Major
                      Found in app/assets/javascripts/projestimate_script.js and 1 other location - About 1 hr to fix
                      app/assets/javascripts/projestimate_script.js on lines 296..302

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

                      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

                                      params = argIsConnection ? {
                                          connection:jpc,
                                          source : jpc.source, target : jpc.target,
                                          sourceId : jpc.sourceId, targetId : jpc.targetId,
                                          sourceEndpoint : jpc.endpoints[0], targetEndpoint : jpc.endpoints[1]
                      Severity: Major
                      Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js and 1 other location - About 1 hr to fix
                      app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 1657..1662

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

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

                                      v8 = fmtChartJS(config,100 * jsGraphAnnotate[ctx.canvas.id][i][5] / jsGraphAnnotate[ctx.canvas.id][i][9],config.fmtV8);                                  // v8=percentage;
                      Severity: Major
                      Found in app/assets/javascripts/ChartNew.js and 2 other locations - About 1 hr to fix
                      app/assets/javascripts/ChartNew.js on lines 438..438
                      app/assets/javascripts/ChartNew.js on lines 474..474

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

                      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

                                  _super.addSegment("Bezier", {
                                      x1:_sx, y1:_sy, x2:_tx, y2:_ty,
                                      cp1x:_CP[0], cp1y:_CP[1], cp2x:_CP2[0], cp2y:_CP2[1]
                                  });                    
                      Severity: Major
                      Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js and 1 other location - About 1 hr to fix
                      app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 7718..7722

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

                      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