ForestAdmin/forest-express-sequelize

View on GitHub
src/services/query-builder.js

Summary

Maintainability
A
2 hrs
Test Coverage
A
95%

Function QueryBuilder has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function QueryBuilder() {
  this.getIncludes = (modelForIncludes, fieldNamesRequested) => {
    const includes = [];

    Object.values(modelForIncludes.associations)
Severity: Minor
Found in src/services/query-builder.js - About 1 hr to fix

    Function getIncludes has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      this.getIncludes = (modelForIncludes, fieldNamesRequested) => {
        const includes = [];
    
        Object.values(modelForIncludes.associations)
          .filter((association) => [HAS_ONE, BELONGS_TO].includes(association.associationType))
    Severity: Minor
    Found in src/services/query-builder.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status