estimancy/projestimate

View on GitHub

Showing 1,675 of 1,675 total issues

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

                    result = ( parsed || c.parsers[index].type === 'numeric' ) && !isNaN(range1) && !isNaN(range2) ? data.cache :
                        isNaN(data.iExact) ? ts.formatFloat( data.iExact.replace(ts.filter.regex.nondigit, ''), table) :
                            ts.formatFloat( data.iExact, table );
Severity: Major
Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 1 hr to fix
app/assets/javascripts/tablesorter.min.js on lines 466..468

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

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 ($t.find('.' + wo.filter_cssFilter).map(function(){ return $(this).val() || ''; }).get().join('') === ''){
Severity: Major
Found in app/assets/javascripts/pager.js and 1 other location - About 1 hr to fix
app/assets/javascripts/pager.js on lines 2444..2446

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

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(config.inGraphDataRotate=="inRadiusAxis")ctx.rotate(2*Math.PI-posAngle);
                         else ctx.rotate(config.inGraphDataRotate * (Math.PI / 180));
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 2140..2141

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

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 ((match = matchers.rgba.exec(color))) {
            return { r: match[1], g: match[2], b: match[3], a: match[4] };
        }
Severity: Major
Found in app/assets/javascripts/spectrum.js and 1 other location - About 1 hr to fix
app/assets/javascripts/spectrum.js on lines 2210..2212

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

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

                    cachedValue = ( parsed || parser.type === 'numeric' ) && !isNaN(query) && typeof data.cache !== 'undefined' ? data.cache :
                        isNaN(data.iExact) ? ts.formatFloat( data.iExact.replace(ts.filter.regex.nondigit, ''), table) :
                            ts.formatFloat( data.iExact, table );
Severity: Major
Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 1 hr to fix
app/assets/javascripts/tablesorter.min.js on lines 537..539

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

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

                                        all = $t.find('.' + wo.filter_cssFilter).map(function(){
                                            return $(this).val() || '';
                                        }).get().join('');
Severity: Major
Found in app/assets/javascripts/pager.js and 1 other location - About 1 hr to fix
app/assets/javascripts/pager.js on lines 2460..2460

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

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(config.inGraphDataRotate=="inRadiusAxis")ctx.rotate(2*Math.PI-posAngle);
                         else ctx.rotate(config.inGraphDataRotate * (Math.PI / 180));
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 1942..1943

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

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 (self.bgCanvas == null) {                        
                        p["class"] = clazz;
                        p["coordsize"] = (d[2] * scale) + "," + (d[3] * scale);
                        self.bgCanvas = _node("shape", d, p, params.parent, self._jsPlumb, true);                        
                        _pos(self.bgCanvas, d);
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 8390..8406

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

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 (self.canvas == null) {                                        
                    p["class"] = clazz;
                    p["coordsize"] = (d[2] * scale) + "," + (d[3] * scale);                    
                    self.canvas = _node("shape", d, p, params.parent, self._jsPlumb, true);                                    
                    //var group = _getGroup(params.parent);                   // test of append everything to a group
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 8371..8384

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

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 ((match = matchers.hsla.exec(color))) {
            return { h: match[1], s: match[2], l: match[3], a: match[4] };
        }
Severity: Major
Found in app/assets/javascripts/spectrum.js and 1 other location - About 1 hr to fix
app/assets/javascripts/spectrum.js on lines 2204..2206

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

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

        format: function(table, c, wo, init) {
            var stored, time,
                $table = c.$table,
                saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
                sortList = { "sortList" : c.sortList };
Severity: Minor
Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

    Function toggleStylesOn has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      toggleStylesOn: function(type, node, set) {
        var viz = this.viz;
        var nStyles = this.nStyles;
        if(set) {
          var that = this;
    Severity: Minor
    Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

      Function onMouseMove has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        onMouseMove: function(e, win, event) {
          //if mouse button is down and moving set move=true
          if(this.down) this.move = true;
          //already handled by mouseover/out
          if(this.dom && this.isLabel(e, win)) return;
      Severity: Minor
      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

        Function plotStep has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            plotStep: function(delta, controller, animating) {
                var viz = this.viz,
                config = this.config,
                canvas = viz.canvas, 
                ctx = canvas.getCtx(),
        Severity: Minor
        Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

          Function updateHelperLocations has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function updateHelperLocations() {
                      var s = currentSaturation;
                      var v = currentValue;
          
                      if(allowEmpty && isEmpty) {
          Severity: Minor
          Found in app/assets/javascripts/spectrum.js - About 1 hr to fix

            Function _updateAnchorList has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    var _updateAnchorList = function(lists, theta, order, conn, aBoolean, otherElId, idx, reverse, edgeId, elId, connsToPaint, endpointsToPaint) {        
                        // first try to find the exact match, but keep track of the first index of a matching element id along the way.s
                        var exactIdx = -1,
                            firstMatchingElIdx = -1,
                            endpoint = conn.endpoints[idx],
            Severity: Minor
            Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

              Function detach has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      this.detach = function() {
              
                          if (arguments.length == 0) return;
                          var connType =  _currentInstance.Defaults.ConnectionType || _currentInstance.getDefaultConnectionType(),
                              firstArgIsConnection = arguments[0].constructor == connType,
              Severity: Minor
              Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

                Function stopEvent has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                    dragOptions[stopEvent] = _wrap(dragOptions[stopEvent], function() {                             
                                        if (existingStop) existingStop.apply(this, arguments);                                
                
                                        //_currentlyDown = false;
                                        _currentInstance.currentlyDragging = false;
                Severity: Minor
                Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

                  Function addHeaderResizeEvent has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      ts.addHeaderResizeEvent = function(table, disable, options){
                          var defaults = {
                                  timer : 250
                              },
                              o = $.extend({}, defaults, options),
                  Severity: Minor
                  Found in app/assets/javascripts/pager.js - About 1 hr to fix

                    Function format has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            format: function(table, c, wo, init){
                                var sl, time,
                                    $t = c.$table,
                                    ss = wo.saveSort !== false, // make saveSort active/inactive; default to true
                                    sortList = { "sortList" : c.sortList };
                    Severity: Minor
                    Found in app/assets/javascripts/pager.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language