iccicci/sedentary

View on GitHub

Showing 16 of 22 total issues

File local.ts has 688 lines of code (exceeds 500 allowed). Consider refactoring.
Open

import { DatabaseError, Pool } from "pg";

if(! process.env.SPG) throw "Missing SPG!";

export const connection = JSON.parse(process.env.SPG);
Severity: Major
Found in packages/sedentary-pg/test/local.ts - About 6 hrs to fix

    PGDB has 23 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export class PGDB extends DB<TransactionPG> {
      private _client: PoolClient = {} as PoolClient;
      private indexes: string[] = [];
      private oidLoad: Record<number, (ids: unknown[]) => Promise<EntryBase[]>> = {};
      private pool: Pool;
    Severity: Minor
    Found in packages/sedentary-pg/pgdb.ts - About 2 hrs to fix

      File local.ts has 512 lines of code (exceeds 500 allowed). Consider refactoring.
      Open

      import { promises } from "fs";
      
      const { unlink } = promises;
      
      export const connection = "test.json";
      Severity: Major
      Found in packages/sedentary/test/local.ts - About 2 hrs to fix

        Function xref has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def xref(typ, rawtext, text, lineno, inliner, options={}, content=[]):
        Severity: Major
        Found in docs/xref.py - About 50 mins to fix

          Avoid deeply nested control flow statements.
          Open

                      if(adsrc) dropDefault();
          Severity: Major
          Found in packages/sedentary-pg/pgdb.ts - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                      if(this.sync) field.default = defaultValue;
            Severity: Major
            Found in packages/sedentary/test/testDb.ts - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                      } else if(! adsrc || this.defaultNeq(adsrc, defaultValue)) await setDefault(attnotnull);
              Severity: Major
              Found in packages/sedentary-pg/pgdb.ts - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                            if(this.sync) await this._client.query(statement);
                Severity: Major
                Found in packages/sedentary-pg/pgdb.ts - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                            if(adsrc) dropDefault();
                  Severity: Major
                  Found in packages/sedentary-pg/pgdb.ts - About 45 mins to fix

                    Avoid too many return statements within this function.
                    Open

                      for(const [i, [key, value]] of entriesA.entries()) if(key !== entriesB[i][0] || deepDiff(value, entriesB[i][1])) return true;
                    Severity: Major
                    Found in packages/sedentary/db.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                        if(entriesA.length !== entriesB.length) return true;
                      Severity: Major
                      Found in packages/sedentary/db.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                          return false;
                        Severity: Major
                        Found in packages/sedentary/db.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return false;
                          Severity: Major
                          Found in packages/sedentary/db.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                if(! (b instanceof Array)) return true;
                            Severity: Major
                            Found in packages/sedentary/db.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                  for(const [i, value] of a.entries()) if(deepDiff(value, b[i])) return true;
                              Severity: Major
                              Found in packages/sedentary/db.ts - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                    return true;
                                Severity: Major
                                Found in packages/sedentary/db.ts - About 30 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language