ForestAdmin/forest-express-sequelize

View on GitHub

Showing 52 of 78 total issues

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

function HasManyAssociator(model, association, opts, params, data) {
Severity: Minor
Found in src/services/has-many-associator.js - About 35 mins to fix

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

    function HasManyDissociator(model, association, options, params, data) {
    Severity: Minor
    Found in src/services/has-many-dissociator.js - About 35 mins to fix

      Function LiveQueryChecker has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      function LiveQueryChecker() {
        const QUERY_SELECT = /^SELECT\s[^]*FROM\s[^]*$/i;
      
        this.perform = function perform(query) {
          if (!query) {
      Severity: Minor
      Found in src/services/live-query-checker.js - About 35 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 too many return statements within this function.
      Open

            return 'Number';
      Severity: Major
      Found in src/services/apimap-field-type-detector.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return 'Json';
        Severity: Major
        Found in src/services/apimap-field-type-detector.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                return 'Point';
          Severity: Major
          Found in src/services/apimap-field-type-detector.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return currentPreviousInterval;
            Severity: Major
            Found in src/services/filters-parser.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                              return;
              Severity: Major
              Found in src/services/search-builder.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                      return 'Date';
                Severity: Major
                Found in src/services/apimap-field-type-detector.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                        return [new ApimapFieldTypeDetector({ type: column.type.type }, options).perform()];
                  Severity: Major
                  Found in src/services/apimap-field-type-detector.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return null;
                    Severity: Major
                    Found in src/services/apimap-field-type-detector.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                            return 'Time';
                      Severity: Major
                      Found in src/services/apimap-field-type-detector.js - About 30 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language