leonitousconforti/tinyburg

View on GitHub

Showing 100 of 824 total issues

File load-template.ts has 6015 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable quotes */
/* eslint-disable max-lines */

import type sharp from "sharp";
import type { Image } from "./image.js";
Severity: Major
Found in packages/doorman/src/image-operations/load-template.ts - About 2 wks to fix

    File costumes.ts has 2633 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * This file was auto-generated by a frida agent
     *
     * Generated by:
     * /workspaces/tinyburg/packages/insight/dist/src/agents/get-costume-data.js
    Severity: Major
    Found in packages/nucleus/src/data/costumes.ts - About 1 wk to fix

      File missions.ts has 2502 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * This file was auto-generated by a frida agent
       *
       * Generated by:
       * /workspaces/tinyburg/packages/insight/dist/src/agents/get-mission-data.js
      Severity: Major
      Found in packages/nucleus/src/data/missions.ts - About 1 wk to fix

        File bitizen.ts has 1280 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * This file was auto-generated by a frida agent
         *
         * Generated by:
         * /workspaces/tinyburg/packages/insight/dist/src/agents/get-bitizen-data.js
        Severity: Major
        Found in packages/nucleus/src/data/bitizen.ts - About 3 days to fix

          File floors.ts has 806 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * This file was auto-generated by a frida agent
           *
           * Generated by:
           * /workspaces/tinyburg/packages/insight/dist/src/agents/get-floor-data.js
          Severity: Major
          Found in packages/nucleus/src/data/floors.ts - About 1 day to fix

            File roofs.ts has 464 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /**
             * This file was auto-generated by a frida agent
             *
             * Generated by:
             * /workspaces/tinyburg/packages/insight/dist/src/agents/get-roof-data.js
            Severity: Minor
            Found in packages/nucleus/src/data/roofs.ts - About 7 hrs to fix

              File install-run.js has 459 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              // THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED.
              //
              // This script is intended for usage in an automated build environment where a Node tool may not have
              // been preinstalled, or may have an unpredictable version.  This script will automatically install the specified
              // version of the specified tool (if not already installed), and then pass a command-line to it.
              Severity: Minor
              Found in common/scripts/install-run.js - About 7 hrs to fix

                Function matchTemplate has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
                Open

                export const matchTemplate = (
                    searchImage: Image,
                    templateImage: Image,
                    mask?: Image,
                    wantExact: boolean = true,
                Severity: Minor
                Found in packages/doorman/src/image-operations/template-matching.ts - About 6 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function parsingSubRoutine has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
                Open

                export const parsingSubRoutine = function <T extends GenericBlocks, U extends GenericJsonSave<T>>(
                    nimblebitSave: DecompressedSave,
                    blocksToUse: T,
                    log: ILogger = debug
                ): U {
                Severity: Minor
                Found in packages/nucleus/src/parsing-structs/parsing-subroutines.ts - About 6 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                File route.ts has 339 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                const bitLayers = [
                    "skin",
                    "eyes",
                    "hair",
                    "facialhair",
                Severity: Minor
                Found in apps/trading-site/app/api/random-bitizen/route.ts - About 4 hrs to fix

                  Function 679877 has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
                  
                  __webpack_require__.r(__webpack_exports__);
                  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
                  /* harmony export */   "isVariableSetInNpmrcFile": () => (/* binding */ isVariableSetInNpmrcFile),
                  Severity: Major
                  Found in common/scripts/install-run.js - About 4 hrs to fix

                    Function loadFromVersion has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const loadFromVersion = async (version: string, force = false, log: ILogger = debug): Promise<IStructs> => {
                        log.debug("Attempting to load structs for version: %s", version);
                    
                        // Filter the folders in this directory for ones that match the version
                        const folders = await fs.readdir(new URL(".", import.meta.url), { withFileTypes: true });
                    Severity: Major
                    Found in packages/nucleus/src/parsing-structs/load-from-version.ts - About 3 hrs to fix

                      Function WithMouseKeyHandler has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                      Open

                      export const WithMouseKeyHandler: React.FunctionComponent<IWithMouseKeyHandlerProps> = ({
                          jsep,
                          emulatorClient,
                          children,
                      }) => {
                      Severity: Minor
                      Found in packages/window/src/components/InteractiveLayer.tsx - About 3 hrs to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function concatenationSubRoutine has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                      Open

                      export const concatenationSubRoutine = function <T extends GenericBlocks, U extends GenericJsonSave<T>>(
                          jsonSave: U,
                          blocksToUse: T,
                          log: ILogger = debug
                      ): DecompressedSave {
                      Severity: Minor
                      Found in packages/nucleus/src/parsing-structs/parsing-subroutines.ts - About 3 hrs to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function matchTemplate has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const matchTemplate = (
                          searchImage: Image,
                          templateImage: Image,
                          mask?: Image,
                          wantExact: boolean = true,
                      Severity: Major
                      Found in packages/doorman/src/image-operations/template-matching.ts - About 2 hrs to fix

                        Function sort has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public sort(compare: (a: NodeData, b: NodeData) => boolean): DoublyLinkedList<NodeData> {
                                if (this._head === undefined || this._tail === undefined) {
                                    return this;
                                }
                                if (this.length < 2) {
                        Severity: Minor
                        Found in packages/bitprints/src/doubly-linked-list.ts - About 2 hrs to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function Page has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function Page() {
                            return (
                                <div className="flex h-screen bg-black">
                                    <div className="w-screen h-screen flex flex-col justify-center items-center">
                                        <svg
                        Severity: Major
                        Found in apps/trading-site/app/page.tsx - About 2 hrs to fix

                          Function parsingSubRoutine has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const parsingSubRoutine = function <T extends GenericBlocks, U extends GenericJsonSave<T>>(
                              nimblebitSave: DecompressedSave,
                              blocksToUse: T,
                              log: ILogger = debug
                          ): U {
                          Severity: Major
                          Found in packages/nucleus/src/parsing-structs/parsing-subroutines.ts - About 2 hrs to fix

                            Function transformToSourceCode has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public transformToSourceCode() {
                                    // Source code for accessories (maybe move these to costume structs?)
                                    const numberHairAccessoriesSourceTS = `export const numberHairAccessories = ${this.data.numberHairAccessories} as const;\n`;
                                    const numberGlassesSourceTS = `export const numberGlasses = ${this.data.numberGlasses} as const;\n`;
                                    const numberFemaleHatsSourceTS = `export const numberFemaleHats = ${this.data.numberFemaleHats} as const;\n`;
                            Severity: Major
                            Found in packages/insight/src/agents/get-bitizen-data.ts - About 2 hrs to fix

                              Function readObject has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const readObject = (
                                  object: Il2Cpp.Object
                              ): boolean | number | string | NativePointer | unknown[] | undefined => {
                                  switch (object.class.type.typeEnum) {
                                      case Il2Cpp.Type.enum.void: {
                              Severity: Major
                              Found in packages/insight/src/helpers/read.ts - About 2 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language