AlexAegis/advent-of-code

View on GitHub

Showing 28 of 568 total issues

Function render has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    render(world: GridWorld): Sprite {
        const frame: Sprite = new Sprite();
        if (!this.camera) {
            return frame;
        }
Severity: Minor
Found in solutions/typescript/libs/ecs/src/renderer/renderer.system.ts - About 1 hr to fix

    Function parse has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const parse = (input: string): HexagonalDirection[][] => {
        const instructions: HexagonalDirection[][] = [];
        for (const line of split(input)) {
            const neighbours: HexagonalDirection[] = [];
            let chomp = line;
    Severity: Minor
    Found in solutions/typescript/2020/24/src/parse.function.ts - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                          if (mirroredTo) {
                              beam.direction = mirroredTo;
                              beam.position = beam.position.add(mirroredTo);
                          } else if (splitter) {
                              const [dirA, dirB] = splitter;
      Severity: Major
      Found in solutions/typescript/2023/16/src/internal/beam.ts - About 45 mins to fix

        Avoid too many return statements within this function.
        Open

                    return 0;
        Severity: Major
        Found in solutions/typescript/2022/22/src/parse.function.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return 1;
          Severity: Major
          Found in solutions/typescript/2023/12/src/parse.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return undefined;
            Severity: Major
            Found in solutions/typescript/libs/lib/src/model/vector/bounding-box.class.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return this.haltCondition(this.world);
              Severity: Major
              Found in solutions/typescript/libs/ecs/src/executor/executor.class.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return result;
                Severity: Major
                Found in solutions/typescript/2023/12/src/parse.ts - About 30 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language