estimancy/projestimate

View on GitHub

Showing 1,675 of 1,675 total issues

Function prepareEndpoint has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

        prepareEndpoint = function(existing, index, params, element, elementId, connectorPaintStyle, connectorHoverPaintStyle) {
Severity: Major
Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 50 mins to fix

    Function placeSomeAnchors has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

                    placeSomeAnchors = function(desc, elementDimensions, elementPosition, unsortedConnections, isHorizontal, otherMultiplier, orientation) {
    Severity: Major
    Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 50 mins to fix

      Function add_widget has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          fn.add_widget = function(html, size_x, size_y, col, row, max_size, min_size) {
      Severity: Major
      Found in app/assets/javascripts/jquery.gridster.js - About 50 mins to fix

        Function WidgetInfo has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function WidgetInfo(helperId, widgetId, displayName, type, flags, startupMode, available) {
        Severity: Major
        Found in app/assets/javascripts/spk_multiwidget.js - About 50 mins to fix

          Method pemodule_input has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            def pemodule_input(level, est_val, module_project, level_estimation_values, pbs_project_element, attribute_type="", read_only_value=false)
          Severity: Major
          Found in app/helpers/projects_helper.rb - About 50 mins to fix

            Method display_text_field_tag has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              def display_text_field_tag(level, est_val, module_project, level_estimation_values, pbs_project_element, attribute_type="", read_only_value=false)
            Severity: Major
            Found in app/helpers/projects_helper.rb - About 50 mins to fix

              Function populateLabels has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  function populateLabels(config, labelTemplateString, labels, numberOfSteps, graphMin, graphMax, stepValue) {
              Severity: Major
              Found in app/assets/javascripts/ChartNew.js - About 50 mins to fix

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

                  initialize: function(viz){
                    this.viz = viz;
                    this.canvas = viz.canvas;
                    this.config = viz.config;
                  },
                Severity: Major
                Found in app/assets/javascripts/jit-2.0.1.js and 3 other locations - About 50 mins to fix
                app/assets/javascripts/jit-2.0.1.js on lines 14001..14005
                app/assets/javascripts/jit-2.0.1.js on lines 15585..15589
                app/assets/javascripts/jit-2.0.1.js on lines 15642..15646

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

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

                  initialize: function(viz){
                    this.viz = viz;
                    this.leaf = viz.leaf;
                    this.config = viz.config;
                  },
                Severity: Major
                Found in app/assets/javascripts/jit-2.0.1.js and 3 other locations - About 50 mins to fix
                app/assets/javascripts/jit-2.0.1.js on lines 14001..14005
                app/assets/javascripts/jit-2.0.1.js on lines 15437..15441
                app/assets/javascripts/jit-2.0.1.js on lines 15585..15589

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

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

                  initialize: function(viz){
                    this.viz = viz;
                    this.canvas = viz.canvas;
                    this.config = viz.config;
                  },
                Severity: Major
                Found in app/assets/javascripts/jit-2.0.1.js and 3 other locations - About 50 mins to fix
                app/assets/javascripts/jit-2.0.1.js on lines 15437..15441
                app/assets/javascripts/jit-2.0.1.js on lines 15585..15589
                app/assets/javascripts/jit-2.0.1.js on lines 15642..15646

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

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

                  initialize: function(viz){
                    this.viz = viz;
                    this.leaf = viz.leaf;
                    this.config = viz.config;
                  },
                Severity: Major
                Found in app/assets/javascripts/jit-2.0.1.js and 3 other locations - About 50 mins to fix
                app/assets/javascripts/jit-2.0.1.js on lines 14001..14005
                app/assets/javascripts/jit-2.0.1.js on lines 15437..15441
                app/assets/javascripts/jit-2.0.1.js on lines 15642..15646

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

                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

                    fn.enable_resize = function() {
                        this.$el.removeClass('gs-resize-disabled');
                        this.resize_api.enable();
                        return this;
                    };
                Severity: Minor
                Found in app/assets/javascripts/jquery.gridster.js and 1 other location - About 50 mins to fix
                app/assets/javascripts/jquery.gridster.js on lines 1140..1144

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

                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

                        this.registerConnectionTypes = function(types) {
                            for (var i in types)
                                _connectionTypes[i] = jsPlumb.extend({}, types[i]);
                        };
                Severity: Minor
                Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js and 1 other location - About 50 mins to fix
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 1317..1320

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

                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

                        this.registerEndpointTypes = function(types) {
                            for (var i in types)
                                _endpointTypes[i] = jsPlumb.extend({}, types[i]);
                        };
                Severity: Minor
                Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js and 1 other location - About 50 mins to fix
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 1310..1313

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

                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((rotateAngle < Math.PI/2 && rotateAngle > -Math.PI/2) || rotateAngle > 3*Math.PI/2){
                                  mxlb=((msr.availableWidth-midX)- textMeasurement)/Math.abs(Math.cos(rotateAngle));
                                }
                                else if (Math.cos(rotateAngle!=0)){
                                  mxlb=(midX- textMeasurement)/Math.abs(Math.cos(rotateAngle));
                Severity: Minor
                Found in app/assets/javascripts/ChartNew.js and 1 other location - About 50 mins to fix
                app/assets/javascripts/ChartNew.js on lines 1736..1741

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

                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 cumulativeAngle = -config.startAngle * (Math.PI / 180)+2*Math.PI ,
                               cumvalue = 0,
                                     scaleAnimation = 1,
                                     rotateAnimation = 1;
                Severity: Minor
                Found in app/assets/javascripts/ChartNew.js and 1 other location - About 50 mins to fix
                app/assets/javascripts/ChartNew.js on lines 1852..1855

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

                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(horz) {
                        delegate.fx.animate({
                          modes: ['node-property:width:dimArray'],
                          duration:1500,
                          onComplete: function() {
                Severity: Minor
                Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 50 mins to fix
                app/assets/javascripts/jit-2.0.1.js on lines 11369..11377

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

                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 cumulativeAngle = -config.startAngle * (Math.PI / 180)+2*Math.PI ,
                               cumvalue = 0,
                                     scaleAnimation = 1,
                                     rotateAnimation = 1;
                Severity: Minor
                Found in app/assets/javascripts/ChartNew.js and 1 other location - About 50 mins to fix
                app/assets/javascripts/ChartNew.js on lines 2056..2059

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

                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

                    fn.disable_resize = function() {
                        this.$el.addClass('gs-resize-disabled');
                        this.resize_api.disable();
                        return this;
                    };
                Severity: Minor
                Found in app/assets/javascripts/jquery.gridster.js and 1 other location - About 50 mins to fix
                app/assets/javascripts/jquery.gridster.js on lines 1153..1157

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

                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((rotateAngle < Math.PI/2 && rotateAngle > -Math.PI/2) || rotateAngle > 3*Math.PI/2){
                                  if (mxlb<maxR)maxR=mxlb;
                                }
                                else if (Math.cos(rotateAngle) !=0){
                                  if (mxlb<maxL)maxL=mxlb;
                Severity: Minor
                Found in app/assets/javascripts/ChartNew.js and 1 other location - About 50 mins to fix
                app/assets/javascripts/ChartNew.js on lines 1755..1760

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

                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