leonitousconforti/tinyburg

View on GitHub

Showing 824 of 824 total issues

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

    retrieveData() {
        this.dependencies.musicEnabledField.value = this._musicEnabled;
        const musicEnabled = this.dependencies.musicEnabledField.value;
        return { musicEnabled };
    }
Severity: Major
Found in packages/insight/examples/js-typed/setter-agent.js and 1 other location - About 1 hr to fix
packages/insight/examples/js/setter-agent.js on lines 26..30

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 59.

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 handler has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const handler = async function (request: Request, reply: Reply): Promise<void> {
    request.log.debug({ req: request }, "handler hook fired");
    const { playerId, salt, playerSs, finalUrl, endpoint } = request.nimblebitData;

    // Make the request
Severity: Minor
Found in apps/authproxy/src/routes/v1/handler.ts - About 1 hr to fix

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

        retrieveData() {
            this.dependencies.musicEnabledField.value = this._musicEnabled;
            const musicEnabled = this.dependencies.musicEnabledField.value;
            return { musicEnabled };
        }
    Severity: Major
    Found in packages/insight/examples/js/setter-agent.js and 1 other location - About 1 hr to fix
    packages/insight/examples/js-typed/setter-agent.js on lines 31..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 59.

    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: "Art Lobby",
            type: FloorType.Lobby,
            character: "artmajor",
            animations: [{ element: "glow", x: 29, y: 27, additive: true, ftime: "0.15", startframe: 1 }],
    Severity: Major
    Found in packages/nucleus/src/data/floors.ts and 1 other location - About 1 hr to fix
    packages/nucleus/src/data/floors.ts on lines 361..366

    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 59.

    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: "Tree Lobby",
            type: FloorType.Lobby,
            character: "artmajor",
            animations: [{ element: "glow", x: 30, y: 21, additive: true, ftime: "0.155", startframe: 3 }],
    Severity: Major
    Found in packages/nucleus/src/data/floors.ts and 1 other location - About 1 hr to fix
    packages/nucleus/src/data/floors.ts on lines 323..328

    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 59.

    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 buildImage has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Effect.gen(function* () {
            const images: MobyApi.Images.Images = yield* MobyApi.Images.Images;
    
            const context: url.URL = new URL("../../emulator", import.meta.url);
            const tarStream: tar.Pack = tar.pack(url.fileURLToPath(context));
    Severity: Minor
    Found in packages/architect/src/docker-helpers/1-build-image.ts - About 1 hr to fix

      Function Login has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function Login() {
          return (
              <div className="flex h-screen w-screen items-center justify-center bg-gray-50">
                  <div className="z-10 w-full max-w-md overflow-hidden rounded-2xl border border-gray-100 shadow-xl">
                      <div className="flex flex-col items-center justify-center space-y-3 border-b border-gray-200 bg-white px-4 py-6 pt-8 text-center sm:px-16">
      Severity: Minor
      Found in apps/trading-site/app/login/page.tsx - About 1 hr to fix

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

        /******/     (() => {
        /******/         __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
        /******/     })();
        Severity: Major
        Found in common/scripts/install-run.js and 1 other location - About 1 hr to fix
        common/scripts/install-run-rush.js on lines 91..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 58.

        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

        /******/     (() => {
        /******/         __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
        /******/     })();
        Severity: Major
        Found in common/scripts/install-run-rush.js and 1 other location - About 1 hr to fix
        common/scripts/install-run.js on lines 259..261

        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 58.

        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 modifySave has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const modifySave = async function <
            T extends INimblebitJsonSave | DecompressedSave,
            U extends keyof INimblebitJsonSave | (readonly [] | readonly (keyof INimblebitJsonSave)[]),
            V extends U extends keyof INimblebitJsonSave
                ? INimblebitJsonSave[U]
        Severity: Minor
        Found in packages/nucleus/src/modify-save.ts - About 1 hr to fix

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

              public transformToSourceCode() {
                  // Import for the floor type enum
                  // eslint-disable-next-line quotes
                  const floorTypeEnumImport = 'import { FloorType } from "./floors.js";\n';
          
          
          Severity: Minor
          Found in packages/insight/src/agents/get-mission-data.ts - About 1 hr to fix

            Function readObject has a Cognitive Complexity of 10 (exceeds 5 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: Minor
            Found in packages/insight/src/helpers/read.ts - About 1 hr 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 quicksort has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    const quicksort = (start: LinkedListNode<NodeData>, end: LinkedListNode<NodeData>): void => {
                        if (start === end) return;
            
                        const pivotData = end.data;
                        let current: LinkedListNode<NodeData> | undefined = start;
            Severity: Minor
            Found in packages/bitprints/src/doubly-linked-list.ts - About 1 hr to fix

              Function grayscaleImage has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const grayscaleImage = (sourceImage: Image): Image => {
                  sourceImageGuard(sourceImage);
                  assert(sourceImage.channels === 3, "Source image must have three channels");
                  assert(
                      sourceImage.format === ImageType.RGB || sourceImage.format === ImageType.BGR,
              Severity: Minor
              Found in packages/doorman/src/image-operations/grayscale-image.ts - About 1 hr to fix

                Function syncNpmrc has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function syncNpmrc(options) {
                    const { sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish, logger = {
                        // eslint-disable-next-line no-console
                        info: console.log,
                        // eslint-disable-next-line no-console
                Severity: Minor
                Found in common/scripts/install-run.js - About 1 hr to fix

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

                  const rpcExports: ICostumeAgentExports = {
                      main: async () => {
                          const instance = await new GetCostumeData().start();
                          return instance.transformToSourceCode();
                      },
                  Severity: Major
                  Found in packages/insight/src/agents/get-costume-data.ts and 7 other locations - About 1 hr to fix
                  packages/insight/src/agents/get-bitbook-data.ts on lines 85..90
                  packages/insight/src/agents/get-bitizen-data.ts on lines 169..174
                  packages/insight/src/agents/get-elevator-data.ts on lines 73..78
                  packages/insight/src/agents/get-floor-data.ts on lines 118..123
                  packages/insight/src/agents/get-mission-data.ts on lines 116..121
                  packages/insight/src/agents/get-pet-data.ts on lines 62..67
                  packages/insight/src/agents/get-roof-data.ts on lines 68..73

                  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 55.

                  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 8 locations. Consider refactoring.
                  Open

                  const rpcExports: IMissionAgentExports = {
                      main: async () => {
                          const instance = await new GetMissionData().start();
                          return instance.transformToSourceCode();
                      },
                  Severity: Major
                  Found in packages/insight/src/agents/get-mission-data.ts and 7 other locations - About 1 hr to fix
                  packages/insight/src/agents/get-bitbook-data.ts on lines 85..90
                  packages/insight/src/agents/get-bitizen-data.ts on lines 169..174
                  packages/insight/src/agents/get-costume-data.ts on lines 54..59
                  packages/insight/src/agents/get-elevator-data.ts on lines 73..78
                  packages/insight/src/agents/get-floor-data.ts on lines 118..123
                  packages/insight/src/agents/get-pet-data.ts on lines 62..67
                  packages/insight/src/agents/get-roof-data.ts on lines 68..73

                  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 55.

                  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 8 locations. Consider refactoring.
                  Open

                  const rpcExports: IRoofAgentExports = {
                      main: async () => {
                          const instance = await new GetRoofData().start();
                          return instance.transformToSourceCode();
                      },
                  Severity: Major
                  Found in packages/insight/src/agents/get-roof-data.ts and 7 other locations - About 1 hr to fix
                  packages/insight/src/agents/get-bitbook-data.ts on lines 85..90
                  packages/insight/src/agents/get-bitizen-data.ts on lines 169..174
                  packages/insight/src/agents/get-costume-data.ts on lines 54..59
                  packages/insight/src/agents/get-elevator-data.ts on lines 73..78
                  packages/insight/src/agents/get-floor-data.ts on lines 118..123
                  packages/insight/src/agents/get-mission-data.ts on lines 116..121
                  packages/insight/src/agents/get-pet-data.ts on lines 62..67

                  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 55.

                  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

                          animations: [
                              { element: "torch", x: 2, y: 27, ftime: "0.13" },
                              { element: "torch", x: 24, y: 27, ftime: "0.13", startframe: 4 },
                          ],
                  Severity: Major
                  Found in packages/nucleus/src/data/elevators.ts and 3 other locations - About 1 hr to fix
                  packages/nucleus/src/data/floors.ts on lines 407..410
                  packages/nucleus/src/data/floors.ts on lines 481..484
                  packages/nucleus/src/data/roofs.ts on lines 102..105

                  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 55.

                  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 8 locations. Consider refactoring.
                  Open

                  const rpcExports: IFloorAgentExports = {
                      main: async () => {
                          const instance = await new GetFloorData().start();
                          return instance.transformToSourceCode();
                      },
                  Severity: Major
                  Found in packages/insight/src/agents/get-floor-data.ts and 7 other locations - About 1 hr to fix
                  packages/insight/src/agents/get-bitbook-data.ts on lines 85..90
                  packages/insight/src/agents/get-bitizen-data.ts on lines 169..174
                  packages/insight/src/agents/get-costume-data.ts on lines 54..59
                  packages/insight/src/agents/get-elevator-data.ts on lines 73..78
                  packages/insight/src/agents/get-mission-data.ts on lines 116..121
                  packages/insight/src/agents/get-pet-data.ts on lines 62..67
                  packages/insight/src/agents/get-roof-data.ts on lines 68..73

                  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 55.

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language