AlexAegis/avl

View on GitHub

Showing 5 of 53 total issues

Tree has 39 functions (exceeds 20 allowed). Consider refactoring.
Open

@jsonObject
@toJson
export class Tree<
    K extends number | string | V | Comparable<K> | any = number | string,
    V extends number | string | Convertable<K> | any = any
Severity: Minor
Found in src/tree.class.ts - About 5 hrs to fix

    Node has 22 functions (exceeds 20 allowed). Consider refactoring.
    Open

    @jsonObject
    export class Node<
        K extends number | string | V | Comparable<K> | any = number | string,
        V extends number | string | Convertable<K> | any = any
    > {
    Severity: Minor
    Found in src/node.class.ts - About 2 hrs to fix

      Consider simplifying this complex logical expression.
      Open

                  if (((this.r && this.r.r && this.r.r.h) || 0) > ((this.r && this.r.l && this.r.l.h) || 0)) {
                      return this.lrotate();
                  } else return this.rlrotate();
      Severity: Major
      Found in src/node.class.ts - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

                    if (((this.l && this.l.l && this.l.l.h) || 0) > ((this.l && this.l.r && this.l.r.h) || 0)) {
                        return this.rrotate();
                    } else return this.lrrotate();
        Severity: Major
        Found in src/node.class.ts - About 1 hr to fix

          Avoid too many return statements within this function.
          Open

                  } else return this;
          Severity: Major
          Found in src/node.class.ts - About 30 mins to fix
            Severity
            Category
            Status
            Source
            Language