estimancy/projestimate

View on GitHub

Showing 1,675 of 1,675 total issues

Function contains has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    'contains': function(node, mpos) {
      var pos = node.pos.getc(true), 
          width = node.getData('width'),
          height = node.getData('height'),
          algnPos = this.getAlignedPos(pos, width, height),
Severity: Minor
Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

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

      Function select has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              select: function(id, onComplete) {
                  var group = this.group, geom = this.geom;
                  var node=  this.graph.getNode(id), canvas = this.canvas;
                  var root  = this.graph.getNode(this.root);
                  var complete = $.merge(this.controller, onComplete);
      Severity: Minor
      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

        Function continueFunction has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                                        var continueFunction = function() {
                                            // remove this jpc from the current endpoint
                                            jpc.endpoints[idx].detachFromConnection(jpc);
                                            if (jpc.suspendedEndpoint) jpc.suspendedEndpoint.detachFromConnection(jpc);
                                            jpc.endpoints[idx] = self;
        Severity: Minor
        Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

          Function sortText has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      ts.sortText = function(table, a, b, col) {
                          if (a === b) { return 0; }
                          var c = table.config, e = c.string[ (c.empties[col] || c.emptyTo ) ],
                              r = ts.regex, xN, xD, yN, yD, xF, yF, i, mx;
                          if (a === '' && e !== 0) { return typeof e === 'boolean' ? (e ? -1 : 1) : -e || -1; }
          Severity: Minor
          Found in app/assets/javascripts/pager.js - About 1 hr to fix

            Function processStyle has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function processStyle(styleString) {
                if (styleString in processStyleCache) {
                  return processStyleCache[styleString];
                }
            
            
            Severity: Minor
            Found in app/assets/javascripts/jit-2.0.1-excanvas.js - About 1 hr to fix

              Function move_widget_down has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  fn.move_widget_down = function($widget, y_units) {
                      var el_grid_data, actual_row, moved, y_diff;
              
                      if (y_units <= 0) { return false; }
              
              
              Severity: Minor
              Found in app/assets/javascripts/jquery.gridster.js - About 1 hr to fix

                Function next_position has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    fn.next_position = function(size_x, size_y) {
                        size_x || (size_x = 1);
                        size_y || (size_y = 1);
                        var ga = this.gridmap;
                        var cols_l = ga.length;
                Severity: Minor
                Found in app/assets/javascripts/jquery.gridster.js - About 1 hr to fix

                  Function move_widget_up has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      fn.move_widget_up = function($widget, y_units) {
                          var el_grid_data = $widget.coords().grid;
                          var actual_row = el_grid_data.row;
                          var moved = [];
                          var can_go_up = true;
                  Severity: Minor
                  Found in app/assets/javascripts/jquery.gridster.js - About 1 hr to fix

                    Function moveMonth has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            moveMonth: function(date, dir){
                                if (!dir) return date;
                                var new_date = new Date(date.valueOf()),
                                    day = new_date.getUTCDate(),
                                    month = new_date.getUTCMonth(),
                    Severity: Minor
                    Found in app/assets/javascripts/bootstrap-datepicker.js - About 1 hr to fix

                      Method generate_activity_element_tree has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def generate_activity_element_tree(element, tree)
                          #Root is always display
                          tree ||= String.new
                          unless element.nil?
                            if element.is_root?
                      Severity: Minor
                      Found in app/helpers/wbs_activity_elements_helper.rb - About 1 hr to fix

                        Method get_chart_data_effort_and_cost has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def get_chart_data_effort_and_cost(pbs_project_element, module_project, estimation_value, view_widget)
                            chart_data = []
                            effort_breakdown_stacked_bar_dataset = {}
                        
                            return chart_data if (!module_project.pemodule.alias.eql?(Projestimate::Application::EFFORT_BREAKDOWN) || estimation_value.nil?)
                        Severity: Minor
                        Found in app/helpers/views_widgets_helper.rb - About 1 hr to fix

                          Method render_selected_wbs_activity_elements has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            def render_selected_wbs_activity_elements
                              @project = Project.find(params[:project_id])
                              authorize! :edit_project, @project
                          
                              @pe_wbs_project_activity = @project.pe_wbs_projects.activities_wbs.first
                          Severity: Minor
                          Found in app/controllers/projects_controller.rb - About 1 hr to fix

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

                                            ymin = Math.min(d.hxy.y, d.tail[0].y, d.tail[1].y, d.cxy.y),
                            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 8577..8577
                            app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 8579..8579
                            app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 8580..8580

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

                            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

                                                if (trow > 0 && this.is_widget(col, trow) &&
                                                    $.inArray(ga[col][trow], matched) === -1
                                                ) {
                                                    cr = callback.call(ga[col][trow], col, trow);
                                                    matched.push(ga[col][trow]);
                            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 3486..3492

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

                            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

                                        var xmin = Math.min(d.hxy.x, d.tail[0].x, d.tail[1].x, d.cxy.x),
                            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 8578..8578
                            app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 8579..8579
                            app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 8580..8580

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

                            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

                                                [this.element, {
                                                    focus: $.proxy(this.show, this),
                                                    keyup: $.proxy(this.update, this),
                                                    keydown: $.proxy(this.keydown, this)
                                                }]
                            Severity: Major
                            Found in app/assets/javascripts/bootstrap-datepicker.js and 1 other location - About 1 hr to fix
                            app/assets/javascripts/bootstrap-datepicker.js on lines 187..191

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

                            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

                                                if (this.is_widget(col, trow) &&
                                                    $.inArray(ga[col][trow], matched) === -1
                                                ) {
                                                    cr = callback.call(ga[col][trow], col, trow);
                                                    matched.push(ga[col][trow]);
                            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 3475..3481

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

                            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

                                                [this.element.find('input'), {
                                                    focus: $.proxy(this.show, this),
                                                    keyup: $.proxy(this.update, this),
                                                    keydown: $.proxy(this.keydown, this)
                                                }],
                            Severity: Major
                            Found in app/assets/javascripts/bootstrap-datepicker.js and 1 other location - About 1 hr to fix
                            app/assets/javascripts/bootstrap-datepicker.js on lines 177..181

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

                            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

                                            ymax = Math.max(d.hxy.y, d.tail[0].y, d.tail[1].y, d.cxy.y),
                            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 8577..8577
                            app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 8578..8578
                            app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 8579..8579

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

                            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