ForestAdmin/forest-express-sequelize

View on GitHub

Showing 53 of 79 total issues

Avoid deeply nested control flow statements.
Open

                if (field.type === 'Number') {
                  const value = parseInt(params.search, 10) || 0;
                  if (value) {
                    condition = opts.Sequelize.where(column, ' = ', value);
                    hasExtendedConditions = true;
Severity: Major
Found in src/services/search-builder.js - About 45 mins to fix

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

        function ResourcesExporter(model, options, params, association, user) {
        Severity: Minor
        Found in src/services/resources-exporter.js - About 35 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 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 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 '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 '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 [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;
                      Severity: Major
                      Found in src/services/search-builder.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

                          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
                            Severity
                            Category
                            Status
                            Source
                            Language