estimancy/projestimate

View on GitHub

Showing 1,675 of 1,675 total issues

Function prepareEndpoint has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        prepareEndpoint = function(existing, index, params, element, elementId, connectorPaintStyle, connectorHoverPaintStyle) {
            var e;
            if (existing) {
                self.endpoints[index] = existing;
                existing.addConnection(self);                    
Severity: Minor
Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

    Function _prepareCompute has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            var _prepareCompute = function(params) {
                self.lineWidth = params.lineWidth;
                var segment = jsPlumbUtil.segment(params.sourcePos, params.targetPos),
                    swapX = params.targetPos[0] < params.sourcePos[0],
                    swapY = params.targetPos[1] < params.sourcePos[1],
    Severity: Minor
    Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

      Function markup has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          markup = (function () {
      
              // IE does not support gradients with multiple stops, so we need to simulate
              //  that for the rainbow slider with 8 divs that each have a single gradient
              var gradientFix = "";
      Severity: Minor
      Found in app/assets/javascripts/spectrum.js - About 1 hr to fix

        Function slide has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          , slide: function (type, next) {
              var $active = this.$element.find('.item.active')
                , $next = next || $active[type]()
                , isCycling = this.interval
                , direction = type == 'next' ? 'left' : 'right'
        Severity: Minor
        Found in app/assets/javascripts/bootstrap.js - About 1 hr to fix

          Function find_collisions has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              fn.find_collisions = function(player_data_coords){
                  var self = this;
                  var overlapping_region = this.options.overlapping_region;
                  var colliders_coords = [];
                  var colliders_data = [];
          Severity: Minor
          Found in app/assets/javascripts/jquery.gridster.js - About 1 hr to fix

            Function Radar has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                this.Radar = function (data, options) {
            
                    chart.Radar.defaults = {
                        scaleOverlay: false,
                        scaleOverride: false,
            Severity: Minor
            Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

              Method update_selected_attribute_organizations has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def update_selected_attribute_organizations
                  authorize! :manage_organizations, Organization
                  @organization = Organization.find(params[:organization_id])
                  @organization_projects = @organization.projects
                  # Get the Initialization module. It is set in the ApplicationController : @initialization_module = Pemodule.find_by_alias("initialization")
              Severity: Minor
              Found in app/controllers/attribute_organizations_controller.rb - About 1 hr to fix

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

                                ep.paintStyle = ep.paintStyle ||
                                                 _currentInstance.Defaults.EndpointStyles[epIndex] ||
                                                _currentInstance.Defaults.EndpointStyle ||
                                                jsPlumb.Defaults.EndpointStyles[epIndex] ||
                                                jsPlumb.Defaults.EndpointStyle;
                Severity: Major
                Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js and 3 other locations - About 1 hr to fix
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 2669..2673
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 2675..2679
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 2681..2685

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

                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

                                ep.anchor = ep.anchor ||
                                              _currentInstance.Defaults.Anchors[epIndex] ||
                                              _currentInstance.Defaults.Anchor ||
                                              jsPlumb.Defaults.Anchors[epIndex] ||
                                              jsPlumb.Defaults.Anchor;                           
                Severity: Major
                Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js and 3 other locations - About 1 hr to fix
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 2664..2668
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 2669..2673
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 2681..2685

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

                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

                                ep.hoverPaintStyle = ep.hoverPaintStyle ||
                                               _currentInstance.Defaults.EndpointHoverStyles[epIndex] ||
                                               _currentInstance.Defaults.EndpointHoverStyle ||
                                               jsPlumb.Defaults.EndpointHoverStyles[epIndex] ||
                                               jsPlumb.Defaults.EndpointHoverStyle;                            
                Severity: Major
                Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js and 3 other locations - About 1 hr to fix
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 2664..2668
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 2675..2679
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 2681..2685

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

                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

                                ep.endpoint = ep.endpoint ||
                                              _currentInstance.Defaults.Endpoints[epIndex] ||
                                              _currentInstance.Defaults.Endpoint ||
                                              jsPlumb.Defaults.Endpoints[epIndex] ||
                                              jsPlumb.Defaults.Endpoint;
                Severity: Major
                Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js and 3 other locations - About 1 hr to fix
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 2664..2668
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 2669..2673
                app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 2675..2679

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

                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

                        barWidth = (valueHop - config.scaleGridLineWidth * 2 - (config.barValueSpacing * 2) - (config.barDatasetSpacing * data.datasets.length - 1) - (config.barStrokeWidth / 2) - 1);
                Severity: Major
                Found in app/assets/javascripts/ChartNew.js and 1 other location - About 1 hr to fix
                app/assets/javascripts/ChartNew.js on lines 2928..2928

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

                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

                        for (var x = 1; x <= max_size_x; x++) {
                            styles += (opts.namespace + ' [data-sizex="' + x + '"] { width:' +
                                (x * opts.widget_base_dimensions[0] +
                                (x - 1) * (opts.widget_margins[0] * 2)) + 'px; }\n');
                        }
                Severity: Major
                Found in app/assets/javascripts/jquery.gridster.js and 1 other location - About 1 hr to fix
                app/assets/javascripts/jquery.gridster.js on lines 3684..3688

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

                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

                        barWidth = (scaleHop - config.scaleGridLineWidth * 2 - (config.barValueSpacing * 2) - (config.barDatasetSpacing * data.datasets.length - 1) - (config.barStrokeWidth / 2) - 1);
                Severity: Major
                Found in app/assets/javascripts/ChartNew.js and 1 other location - About 1 hr to fix
                app/assets/javascripts/ChartNew.js on lines 2586..2586

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

                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

                        for (var y = 1; y <= opts.rows; y++) {
                            styles += (opts.namespace + ' [data-sizey="' + y + '"] { height:' +
                                (y * opts.widget_base_dimensions[1] +
                                (y - 1) * (opts.widget_margins[1] * 2)) + 'px; }\n');
                        }
                Severity: Major
                Found in app/assets/javascripts/jquery.gridster.js and 1 other location - About 1 hr to fix
                app/assets/javascripts/jquery.gridster.js on lines 3690..3694

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

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

                  function design(graph, node, prop, config, orn) {
                    var multitree = config.multitree;
                    var auxp = [ 'x', 'y' ], auxs = [ 'width', 'height' ];
                    var ind = +(orn == "left" || orn == "right");
                    var p = auxp[ind], notp = auxp[1 - ind];
                Severity: Minor
                Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                     nodeFx: function(opt) {
                       var viz = this.viz,
                           graph  = viz.graph,
                           animation = this.nodeFxAnimation,
                           options = $.merge(this.viz.config, {
                  Severity: Minor
                  Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                      enter: function (node) {
                        if (this.busy)
                          return;
                        this.busy = true;
                    
                    
                    Severity: Minor
                    Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                        attachEvents: function() {
                          var htmlCanvas = this.canvas.getElement(), 
                              that = this;
                          htmlCanvas.oncontextmenu = $.lambda(false);
                          $.addEvents(htmlCanvas, {
                      Severity: Minor
                      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                    writeSegments = function(segments, paintInfo) {
                                        var current, next;                
                                        for (var i = 0; i < segments.length - 1; i++) {
                                            
                                            current = current || _cloneArray(segments[i]);
                        Severity: Minor
                        Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language