JohnMunsch/PaperQuik

View on GitHub

Showing 1,311 of 1,311 total issues

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

jQuery.expr.filters.animated = function( elem ) {
    return jQuery.grep(jQuery.timers, function( fn ) {
        return elem === fn.elem;
    }).length;
};
Severity: Major
Found in app/bower_components/jquery/dist/jquery.js and 1 other location - About 1 hr to fix
app/bower_components/jquery/src/effects/animatedSelector.js on lines 7..11

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

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

jQuery.expr.filters.animated = function( elem ) {
    return jQuery.grep(jQuery.timers, function( fn ) {
        return elem === fn.elem;
    }).length;
};
Severity: Major
Found in app/bower_components/jquery/src/effects/animatedSelector.js and 1 other location - About 1 hr to fix
app/bower_components/jquery/dist/jquery.js on lines 8886..8890

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

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

jQuery.acceptData = function( owner ) {
    // Accepts only:
    //  - Node
    //    - Node.ELEMENT_NODE
    //    - Node.DOCUMENT_NODE
Severity: Major
Found in app/bower_components/jquery/dist/jquery.js and 1 other location - About 1 hr to fix
app/bower_components/jquery/src/data/accepts.js on lines 8..17

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

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

Consider simplifying this complex logical expression.
Open

                if (winding && (winding === 1
                        && y >= values[1] && y <= values[7]
                        || y >= values[7] && y <= values[1])
                    && Curve.solveCubic(values, 1, y, roots, 0,
                        !next.winding && next.values[1] === y ? 1 : MAX) === 1){
Severity: Critical
Found in app/bower_components/paper/dist/paper-core.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

                    if (winding && (winding === 1
                            && y >= values[1] && y <= values[7]
                            || y >= values[7] && y <= values[1])
                        && Curve.solveCubic(values, 1, y, roots, 0,
                            !next.winding && next.values[1] === y ? 1 : MAX) === 1){
    Severity: Critical
    Found in app/bower_components/paper/dist/paper-full.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                              } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
                                  diff = cache[1];
      
                              // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
                              } else {
      Severity: Critical
      Found in app/bower_components/jquery/dist/jquery.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

                    if ( start && start[ 3 ] !== unit ) {
                        // Trust units reported by jQuery.css
                        unit = unit || start[ 3 ];
        
                        // Make sure we update the tween properties later on
        Severity: Critical
        Found in app/bower_components/jquery/dist/jquery.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                                  } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
                                      diff = cache[1];
          
                                  // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
                                  } else {
          Severity: Critical
          Found in app/bower_components/jquery/src/sizzle/dist/sizzle.js - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

                        if ( start && start[ 3 ] !== unit ) {
                            // Trust units reported by jQuery.css
                            unit = unit || start[ 3 ];
            
                            // Make sure we update the tween properties later on
            Severity: Critical
            Found in app/bower_components/jquery/src/effects.js - About 1 hr to fix

              Function equals has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      equals: function(obj1, obj2) {
                          function checkKeys(o1, o2) {
                              for (var i in o1)
                                  if (o1.hasOwnProperty(i) && !o2.hasOwnProperty(i))
                                      return false;
              Severity: Minor
              Found in app/bower_components/paper/dist/paper-core.js - About 1 hr to fix

                Function Rectangle has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        Rectangle: function() {
                            var rect = Rectangle.readNamed(arguments, 'rectangle'),
                                radius = Size.readNamed(arguments, 'radius', 0,
                                        { readNull: true }),
                                bl = rect.getBottomLeft(true),
                Severity: Minor
                Found in app/bower_components/paper/dist/paper-core.js - About 1 hr to fix

                  Function Point has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      initialize: function Point(arg0, arg1) {
                          var type = typeof arg0;
                          if (type === 'number') {
                              var hasY = typeof arg1 === 'number';
                              this.x = arg0;
                  Severity: Minor
                  Found in app/bower_components/paper/dist/paper-core.js - About 1 hr to fix

                    Function exportPath has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function exportPath(item, options) {
                            if (options.matchShapes) {
                                var shape = item.toShape(false);
                                if (shape)
                                    return exportShape(shape, options);
                    Severity: Minor
                    Found in app/bower_components/paper/dist/paper-core.js - About 1 hr to fix

                      Function _updateEvent has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _updateEvent: function(type, point, minDistance, maxDistance, start,
                                  needsChange, matchMaxDistance) {
                              if (!start) {
                                  if (minDistance != null || maxDistance != null) {
                                      var minDist = minDistance != null ? minDistance : 0,
                      Severity: Minor
                      Found in app/bower_components/paper/dist/paper-core.js - About 1 hr to fix

                        Function drawHandles has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function drawHandles(ctx, segments, matrix, size) {
                                var half = size / 2;
                        
                                function drawHandle(index) {
                                    var hX = coords[index],
                        Severity: Minor
                        Found in app/bower_components/paper/dist/paper-core.js - About 1 hr to fix

                          Function applyTransform has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function applyTransform(item, value, name, node) {
                                  var transforms = (node.getAttribute(name) || '').split(/\)\s*/g),
                                      matrix = new Matrix();
                                  for (var i = 0, l = transforms.length; i < l; i++) {
                                      var transform = transforms[i];
                          Severity: Minor
                          Found in app/bower_components/paper/dist/paper-core.js - About 1 hr to fix

                            Function Rectangle has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    Rectangle: function() {
                                        var rect = Rectangle.readNamed(arguments, 'rectangle'),
                                            radius = Size.readNamed(arguments, 'radius', 0,
                                                    { readNull: true }),
                                            bl = rect.getBottomLeft(true),
                            Severity: Minor
                            Found in app/bower_components/paper/dist/paper-full.js - About 1 hr to fix

                              Function drawHandles has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function drawHandles(ctx, segments, matrix, size) {
                                      var half = size / 2;
                              
                                      function drawHandle(index) {
                                          var hX = coords[index],
                              Severity: Minor
                              Found in app/bower_components/paper/dist/paper-full.js - About 1 hr to fix

                                Function Point has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    initialize: function Point(arg0, arg1) {
                                        var type = typeof arg0;
                                        if (type === 'number') {
                                            var hasY = typeof arg1 === 'number';
                                            this.x = arg0;
                                Severity: Minor
                                Found in app/bower_components/paper/dist/paper-full.js - About 1 hr to fix

                                  Function equals has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          equals: function(obj1, obj2) {
                                              function checkKeys(o1, o2) {
                                                  for (var i in o1)
                                                      if (o1.hasOwnProperty(i) && !o2.hasOwnProperty(i))
                                                          return false;
                                  Severity: Minor
                                  Found in app/bower_components/paper/dist/paper-full.js - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language