leonitousconforti/tinyburg

View on GitHub

Showing 824 of 824 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    retrieveData() {
        const memoryRange = { base: this.dependencies.musicEnabledField.handle, size: 1 };
        const callbacks = {
            onAccess: () => this.emittery.emit("musicStatusChanged", this.dependencies.musicEnabledField.value),
        };
Severity: Major
Found in packages/insight/examples/js/alert-agent2.js and 1 other location - About 2 hrs to fix
packages/insight/examples/js-typed/alert-agent2.js on lines 35..41

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 91.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    {
        name: "British Lobby",
        type: FloorType.Lobby,
        character: "artmajor",
        animations: [
Severity: Major
Found in packages/nucleus/src/data/floors.ts and 1 other location - About 2 hrs to fix
packages/nucleus/src/data/floors.ts on lines 271..279

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 91.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    {
        name: "Russia Lobby",
        type: FloorType.Lobby,
        character: "artmajor",
        animations: [
Severity: Major
Found in packages/nucleus/src/data/floors.ts and 1 other location - About 2 hrs to fix
packages/nucleus/src/data/floors.ts on lines 304..312

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 91.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

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

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        retrieveData() {
            const memoryRange = { base: this.dependencies.musicEnabledField.handle, size: 1 };
            const callbacks = {
                onAccess: () => this._notificationCallback(this.dependencies.musicEnabledField.value),
            };
    Severity: Major
    Found in packages/insight/examples/js-typed/alert-agent1.js and 1 other location - About 2 hrs to fix
    packages/insight/examples/js/alert-agent1.js on lines 30..36

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 86.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        retrieveData() {
            const memoryRange = { base: this.dependencies.musicEnabledField.handle, size: 1 };
            const callbacks = {
                onAccess: () => this._notificationCallback(this.dependencies.musicEnabledField.value),
            };
    Severity: Major
    Found in packages/insight/examples/js/alert-agent1.js and 1 other location - About 2 hrs to fix
    packages/insight/examples/js-typed/alert-agent1.js on lines 37..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 86.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 4 locations. Consider refactoring.
    Open

        public loadDependencies() {
            const csharpAssembly = Il2Cpp.domain.assembly("Assembly-CSharp");
            const VPlayerClass = csharpAssembly.image.class("VPlayer");
            const musicEnabledField = VPlayerClass.field<boolean>("musicEnabled");
            return { csharpAssembly, VPlayerClass, musicEnabledField };
    Severity: Major
    Found in packages/insight/examples/ts/getter-agent.ts and 3 other locations - About 2 hrs to fix
    packages/insight/examples/ts/alert-agent1.ts on lines 28..33
    packages/insight/examples/ts/alert-agent2.ts on lines 20..25
    packages/insight/examples/ts/setter-agent.ts on lines 18..23

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            const femaleLastNamesArrayString = this.data.femaleLastNames
                .map((name) => name.charAt(0) + name.charAt(1).toUpperCase() + name.slice(2).toLowerCase())
                .join(", ");
    Severity: Major
    Found in packages/insight/src/agents/get-bitizen-data.ts and 3 other locations - About 2 hrs to fix
    packages/insight/src/agents/get-bitizen-data.ts on lines 108..110
    packages/insight/src/agents/get-bitizen-data.ts on lines 116..118
    packages/insight/src/agents/get-bitizen-data.ts on lines 124..126

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            const maleNamesArrayString = this.data.maleNames
                .map((name) => name.charAt(0) + name.charAt(1).toUpperCase() + name.slice(2).toLowerCase())
                .join(", ");
    Severity: Major
    Found in packages/insight/src/agents/get-bitizen-data.ts and 3 other locations - About 2 hrs to fix
    packages/insight/src/agents/get-bitizen-data.ts on lines 116..118
    packages/insight/src/agents/get-bitizen-data.ts on lines 124..126
    packages/insight/src/agents/get-bitizen-data.ts on lines 132..134

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            const femaleNamesArrayString = this.data.femaleNames
                .map((name) => name.charAt(0) + name.charAt(1).toUpperCase() + name.slice(2).toLowerCase())
                .join(", ");
    Severity: Major
    Found in packages/insight/src/agents/get-bitizen-data.ts and 3 other locations - About 2 hrs to fix
    packages/insight/src/agents/get-bitizen-data.ts on lines 108..110
    packages/insight/src/agents/get-bitizen-data.ts on lines 124..126
    packages/insight/src/agents/get-bitizen-data.ts on lines 132..134

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            const maleLastNamesArrayString = this.data.maleLastNames
                .map((name) => name.charAt(0) + name.charAt(1).toUpperCase() + name.slice(2).toLowerCase())
                .join(", ");
    Severity: Major
    Found in packages/insight/src/agents/get-bitizen-data.ts and 3 other locations - About 2 hrs to fix
    packages/insight/src/agents/get-bitizen-data.ts on lines 108..110
    packages/insight/src/agents/get-bitizen-data.ts on lines 116..118
    packages/insight/src/agents/get-bitizen-data.ts on lines 132..134

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 4 locations. Consider refactoring.
    Open

        public loadDependencies() {
            const csharpAssembly = Il2Cpp.domain.assembly("Assembly-CSharp");
            const VPlayerClass = csharpAssembly.image.class("VPlayer");
            const musicEnabledField = VPlayerClass.field<boolean>("musicEnabled");
            return { csharpAssembly, VPlayerClass, musicEnabledField };
    Severity: Major
    Found in packages/insight/examples/ts/alert-agent2.ts and 3 other locations - About 2 hrs to fix
    packages/insight/examples/ts/alert-agent1.ts on lines 28..33
    packages/insight/examples/ts/getter-agent.ts on lines 11..16
    packages/insight/examples/ts/setter-agent.ts on lines 18..23

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 4 locations. Consider refactoring.
    Open

        public loadDependencies() {
            const csharpAssembly = Il2Cpp.domain.assembly("Assembly-CSharp");
            const VPlayerClass = csharpAssembly.image.class("VPlayer");
            const musicEnabledField = VPlayerClass.field<boolean>("musicEnabled");
            return { csharpAssembly, VPlayerClass, musicEnabledField };
    Severity: Major
    Found in packages/insight/examples/ts/alert-agent1.ts and 3 other locations - About 2 hrs to fix
    packages/insight/examples/ts/alert-agent2.ts on lines 20..25
    packages/insight/examples/ts/getter-agent.ts on lines 11..16
    packages/insight/examples/ts/setter-agent.ts on lines 18..23

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 4 locations. Consider refactoring.
    Open

        public loadDependencies() {
            const csharpAssembly = Il2Cpp.domain.assembly("Assembly-CSharp");
            const VPlayerClass = csharpAssembly.image.class("VPlayer");
            const musicEnabledField = VPlayerClass.field<boolean>("musicEnabled");
            return { csharpAssembly, VPlayerClass, musicEnabledField };
    Severity: Major
    Found in packages/insight/examples/ts/setter-agent.ts and 3 other locations - About 2 hrs to fix
    packages/insight/examples/ts/alert-agent1.ts on lines 28..33
    packages/insight/examples/ts/alert-agent2.ts on lines 20..25
    packages/insight/examples/ts/getter-agent.ts on lines 11..16

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        if (incomingAsStrings) {
            logger.debug("Checking which save is better between save1: %s and save2: %s", save1, save2);
            parsedSave1 = await parseSaveToJson(save1 as DecompressedSave, forceLoadStructs, passLogger);
            parsedSave2 = await parseSaveToJson(save2 as DecompressedSave, forceLoadStructs, passLogger);
        } else {
    Severity: Major
    Found in packages/nucleus/src/compare-saves.ts and 1 other location - About 2 hrs to fix
    packages/nucleus/src/compare-saves.ts on lines 87..93

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 83.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        if (incomingAsStrings) {
            logger.debug("Starting make save better than with save1: %s, save2: %s", save1, save2);
            parsedSave1 = await parseSaveToJson(save1 as DecompressedSave, forceLoadStructs, passLogger);
            parsedSave2 = await parseSaveToJson(save2 as DecompressedSave, forceLoadStructs, passLogger);
        } else {
    Severity: Major
    Found in packages/nucleus/src/compare-saves.ts and 1 other location - About 2 hrs to fix
    packages/nucleus/src/compare-saves.ts on lines 29..35

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 83.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    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

          Function loadFromVersion has a Cognitive Complexity of 16 (exceeds 5 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: Minor
          Found in packages/nucleus/src/parsing-structs/load-from-version.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

          Severity
          Category
          Status
          Source
          Language