yoctore/yoctopus-generator

View on GitHub

Showing 44 of 179 total issues

Avoid deeply nested control flow statements.
Open

                    if (_.last(this.folders[type]) === folder) {
                      // start a timeout here
                      var timeout = setTimeout(function () {
                        // stop spinner
                        this.spinner.stop(true);
Severity: Major
Found in app/index copie.js - About 45 mins to fix

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

    exports.api = function (req, res) {
      // Retrieve api information
      var api      = this.get('config').config.api;
      // Retrieve app information
      var app      = this.get('config').config.app;
    Severity: Minor
    Found in app/templates/applications/node/app/controllers/_.request.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 (_.last(this.folders[type]) === folder) {
                          // start a timeout here
                          var timeout = setTimeout(function () {
                            // stop spinner
                            this.spinner.stop(true);
    Severity: Major
    Found in app/index.js - About 45 mins to fix

      Function $get has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          function ($http, appConstants, $rootScope, $q, logService) {
      Severity: Minor
      Found in app/templates/applications/angular/_provider.js - About 35 mins to fix
        Severity
        Category
        Status
        Source
        Language