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.hidden = function( elem ) {
    // Support: Opera <= 12.12
    // Opera reports offsetWidths and offsetHeights less than zero on some elements
    return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
};
Severity: Minor
Found in app/bower_components/jquery/dist/jquery.js and 1 other location - About 50 mins to fix
app/bower_components/jquery/src/css/hiddenVisibleSelectors.js on lines 6..10

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

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 addCurveLineIntersections has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function addCurveLineIntersections(v1, v2, curve1, curve2, locations,
            include) {
Severity: Minor
Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

    Function solveQuadratic has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            solveQuadratic: function(a, b, c, roots, min, max) {
    Severity: Minor
    Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

      Function getHandleBounds has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          getHandleBounds: function(segments, closed, style, matrix, strokePadding,
                  joinPadding) {
      Severity: Minor
      Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

        Function getIntersections has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                getIntersections: function(v1, v2, curve1, curve2, locations, include) {
        Severity: Minor
        Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

          Function initialize has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              initialize: function Rectangle(x, y, width, height, owner, setter) {
          Severity: Minor
          Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

            Function addLineIntersection has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                function addLineIntersection(v1, v2, curve1, curve2, locations, include) {
            Severity: Minor
            Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

              Function initialize has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              function initialize() {
                  for (var i = 0; i < values.count; i++) {
                      var offset = new paper.Point(20 + 10 * i, 0);
                      var path = new paper.Path();
                      path.fillColor = i % 2 ? 'red' : 'black';
              Severity: Minor
              Found in app/bower_components/paper/examples/Node.js/AnimatedStar.js - About 45 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function solveCubic has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  solveCubic: function (v, coord, val, roots, min, max) {
              Severity: Minor
              Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

                Function initialize has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    initialize: function Segment(arg0, arg1, arg2, arg3, arg4, arg5) {
                Severity: Minor
                Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

                  Function callEvent has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      function callEvent(view, type, event, point, target, lastPoint) {
                  Severity: Minor
                  Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

                    Function _addBevelJoin has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        _addBevelJoin: function(segment, join, radius, miterLimit, addPoint, area) {
                    Severity: Minor
                    Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if (Math.abs(tx - ty) < tolerance)
                                                  return (tx + ty) * 0.5;
                      Severity: Major
                      Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

                        Function solveCubic has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            solveCubic: function (v, coord, val, roots, min, max) {
                        Severity: Minor
                        Found in app/bower_components/paper/dist/paper-full.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if (!compare.test(value))
                                                  return false;
                          Severity: Major
                          Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                        if (value._owner)
                                                            value = value.clone();
                            Severity: Major
                            Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

                              Function initialize has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  initialize: function Rectangle(x, y, width, height, owner, setter) {
                              Severity: Minor
                              Found in app/bower_components/paper/dist/paper-full.js - About 45 mins to fix

                                Function addLineIntersection has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    function addLineIntersection(v1, v2, curve1, curve2, locations, include) {
                                Severity: Minor
                                Found in app/bower_components/paper/dist/paper-full.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if (obj.hasOwnProperty(i))
                                                          res[i] = Base.serialize(obj[i], options, compact,
                                                                  dictionary);
                                  Severity: Major
                                  Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if (from > 0 || to > 0)
                                                                    flattener.drawPart(ctx,
                                                                            Math.max(from, 0), Math.max(to, 0));
                                    Severity: Major
                                    Found in app/bower_components/paper/dist/paper-core.js - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language