JohnMunsch/PaperQuik

View on GitHub

Showing 1,311 of 1,311 total issues

Avoid deeply nested control flow statements.
Open

                        for ( type in data.events ) {
                            if ( special[ type ] ) {
                                jQuery.event.remove( elem, type );

                            // This is a shortcut to avoid jQuery.event.remove's overhead
Severity: Major
Found in app/bower_components/jquery/src/manipulation.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if ( !selector ) {
                            push.apply( results, seed );
                            return results;
                        }
    Severity: Major
    Found in app/bower_components/jquery/src/sizzle/dist/sizzle.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if ( matches[ sel ] === undefined ) {
                                  matches[ sel ] = handleObj.needsContext ?
                                      jQuery( sel, this ).index( cur ) >= 0 :
                                      jQuery.find( sel, this, null, [ cur ] ).length;
                              }
      Severity: Major
      Found in app/bower_components/jquery/src/event.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if ( attrs[ i ] ) {
                                    name = attrs[ i ].name;
                                    if ( name.indexOf( "data-" ) === 0 ) {
                                        name = jQuery.camelCase( name.slice(5) );
                                        dataAttr( elem, name, data[ name ] );
        Severity: Major
        Found in app/bower_components/jquery/src/data.js - About 45 mins to fix

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

          module.exports = function (grunt) {
            'use strict';
          
            // Force use of Unix newlines
            grunt.util.linefeed = '\n';
          Severity: Minor
          Found in app/bower_components/bootstrap/Gruntfile.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

          Avoid deeply nested control flow statements.
          Open

                          if (angular.isDefined(templateUrl)) {
                            next.loadedTemplateUrl = templateUrl;
                            template = $http.get(templateUrl, {cache: $templateCache}).
                                then(function(response) { return response.data; });
                          }
          Severity: Major
          Found in app/bower_components/angular-route/angular-route.js - About 45 mins to fix

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

              function ($q, $log, ready, debug, trackingId, period) {
            Severity: Minor
            Found in app/bower_components/angularitics/src/angulartics-ga-cordova.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                              if (angular.isFunction(templateUrl)) {
                                templateUrl = templateUrl(next.params);
                              }
              Severity: Major
              Found in app/bower_components/angular-route/angular-route.js - About 45 mins to fix

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

                    if (fill.verticalPatternSize) {
                      var verticalPatternSize = fill.verticalPatternSize(options);
                
                      adjustedArea.height =
                          Math.floor(area.height / verticalPatternSize) * verticalPatternSize;
                Severity: Minor
                Found in app/scripts/controllers/paper.js and 1 other location - About 45 mins to fix
                app/scripts/controllers/paper.js on lines 166..171

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

                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 (fill.horizontalPatternSize) {
                      var horizontalPatternSize = fill.horizontalPatternSize(options);
                
                      adjustedArea.width =
                          Math.floor(area.width / horizontalPatternSize) * horizontalPatternSize;
                Severity: Minor
                Found in app/scripts/controllers/paper.js and 1 other location - About 45 mins to fix
                app/scripts/controllers/paper.js on lines 172..177

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

                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 3 locations. Consider refactoring.
                Open

                angular.module("template/modal/window.html", []).run(["$templateCache", function($templateCache) {
                  $templateCache.put("template/modal/window.html",
                    "<div tabindex=\"-1\" role=\"dialog\" class=\"modal fade\" ng-class=\"{in: animate}\" ng-style=\"{'z-index': 1050 + index*10, display: 'block'}\" ng-click=\"close($event)\">\n" +
                    "    <div class=\"modal-dialog\" ng-class=\"{'modal-sm': size == 'sm', 'modal-lg': size == 'lg'}\"><div class=\"modal-content\" ng-transclude></div></div>\n" +
                    "</div>");
                app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 4026..4031
                app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 4050..4055

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

                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.each([
                    "tabIndex",
                    "readOnly",
                    "maxLength",
                    "cellSpacing",
                Severity: Minor
                Found in app/bower_components/jquery/dist/jquery.js and 1 other location - About 45 mins to fix
                app/bower_components/jquery/src/attributes/prop.js on lines 81..94

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

                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 3 locations. Consider refactoring.
                Open

                angular.module("template/progressbar/progressbar.html", []).run(["$templateCache", function($templateCache) {
                  $templateCache.put("template/progressbar/progressbar.html",
                    "<div class=\"progress\">\n" +
                    "  <div class=\"progress-bar\" ng-class=\"type && 'progress-bar-' + type\" role=\"progressbar\" aria-valuenow=\"{{value}}\" aria-valuemin=\"0\" aria-valuemax=\"{{max}}\" ng-style=\"{width: percent + '%'}\" aria-valuetext=\"{{percent | number:0}}%\" ng-transclude></div>\n" +
                    "</div>");
                app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 3959..3964
                app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 4050..4055

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

                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 3 locations. Consider refactoring.
                Open

                angular.module("template/tabs/tabset-titles.html", []).run(["$templateCache", function($templateCache) {
                  $templateCache.put("template/tabs/tabset-titles.html",
                    "<ul class=\"nav {{type && 'nav-' + type}}\" ng-class=\"{'nav-stacked': vertical}\">\n" +
                    "</ul>\n" +
                    "");
                app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 3959..3964
                app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 4026..4031

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

                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.each([
                    "tabIndex",
                    "readOnly",
                    "maxLength",
                    "cellSpacing",
                Severity: Minor
                Found in app/bower_components/jquery/src/attributes/prop.js and 1 other location - About 45 mins to fix
                app/bower_components/jquery/dist/jquery.js on lines 7121..7134

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

                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

                function disableScript( elem ) {
                    elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
                    return elem;
                }
                Severity: Minor
                Found in app/bower_components/jquery/dist/jquery.js and 1 other location - About 40 mins to fix
                app/bower_components/jquery/src/manipulation.js on lines 61..64

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

                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

                function disableScript( elem ) {
                    elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
                    return elem;
                }
                Severity: Minor
                Found in app/bower_components/jquery/src/manipulation.js and 1 other location - About 40 mins to fix
                app/bower_components/jquery/dist/jquery.js on lines 4930..4933

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

                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

                            } else if (arg0.x !== undefined || arg0.width !== undefined) {
                                this.x = arg0.x || 0;
                                this.y = arg0.y || 0;
                                this.width = arg0.width || 0;
                                this.height = arg0.height || 0;
                Severity: Major
                Found in app/bower_components/paper/dist/paper-core.js - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                          if (decomp && !decomp.shearing && decomp.rotation % 90 === 0) {
                              for (var key in bounds) {
                                  var rect = bounds[key];
                                  if (applyMatrix || !rect._internal)
                                      matrix._transformBounds(rect, rect);
                  Severity: Major
                  Found in app/bower_components/paper/dist/paper-core.js - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                                if ((!point || point === this._point || point === this._handleIn)
                                        && (curveIn = curves[index - 1]
                                            || path._closed && curves[curves.length - 1]))
                                    curveIn._changed();
                    Severity: Major
                    Found in app/bower_components/paper/dist/paper-core.js - About 40 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language