leonitousconforti/tinyburg

View on GitHub

Showing 100 of 824 total issues

Avoid too many return statements within this function.
Open

    return logger.fatal(new Error("Bad server response"));
Severity: Major
Found in packages/nucleus/src/endpoints/send-item.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return ImageType.Other;
    Severity: Major
    Found in packages/doorman/src/image-operations/image.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return logger.fatal(new Error("Bad server response"));
      Severity: Major
      Found in packages/nucleus/src/endpoints/upload-save.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return copyArrayToJs(object as unknown as Il2Cpp.Array<Il2Cpp.Object>).map((value) => readObject(value));
        Severity: Major
        Found in packages/insight/src/helpers/read.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return copyListToJs<Il2Cpp.Object>(object).map((value) => readObject(value));
          Severity: Major
          Found in packages/insight/src/helpers/read.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return undefined;
            Severity: Major
            Found in packages/insight/src/helpers/read.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return undefined;
              Severity: Major
              Found in packages/insight/src/helpers/read.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return logger.fatal(new Error("Bad server response"));
                Severity: Major
                Found in packages/nucleus/src/endpoints/raffle.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              if (string === "") return "__Empty String__";
                  Severity: Major
                  Found in packages/insight/src/helpers/read.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return logger.fatal(new Error("Bad server response"));
                    Severity: Major
                    Found in packages/nucleus/src/endpoints/download-save.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return {
                              bitbookPostBlocks: bitbookPostBlocks,
                              bitizenBlocks: bitizenBlocks,
                              blocks: blocks,
                              floorBlocks: floorBlocks,
                      Severity: Major
                      Found in packages/nucleus/src/parsing-structs/load-from-version.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return undefined;
                        Severity: Major
                        Found in packages/insight/src/helpers/read.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return serverResponse;
                          Severity: Major
                          Found in packages/nucleus/src/endpoints/upload-save.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return 0;
                            Severity: Major
                            Found in packages/nucleus/src/endpoints/check-for-newer-save.ts - About 30 mins to fix

                              Function copyDictionaryToJs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export function copyDictionaryToJs<TKey extends Il2Cpp.String | number, TValue extends Il2Cpp.Method.ReturnType>(
                                  object: Il2Cpp.Object
                              ): Record<TKey extends number ? number : string, TValue> {
                                  const dictionary = {} as Record<string | number, TValue>;
                              
                              
                              Severity: Minor
                              Found in packages/insight/src/helpers/copy-dictionary-to-js.ts - About 25 mins 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 makeSaveBetterThan has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export const makeSaveBetterThan = async function <T extends INimblebitJsonSave | DecompressedSave>(
                                  save1: T,
                                  save2: T,
                                  forceLoadStructs: boolean = false,
                                  logger: ILogger = debug
                              Severity: Minor
                              Found in packages/nucleus/src/compare-saves.ts - About 25 mins 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 removeHandlers has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public removeHandlers(...handlerNames: IHandlerName[]): void {
                                      for (const handlerName of handlerNames) {
                                          for (const handler of this._handlers) {
                                              if (handler.name === handlerName) {
                                                  this._handlers.delete(handler);
                              Severity: Minor
                              Found in packages/doorman/src/doorman.ts - About 25 mins 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 negateImage has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export const negateImage = (sourceImage: Image): Image => {
                                  sourceImageGuard(sourceImage);
                                  assert(!sourceImage.format.includes("alpha"), "Can not negate image with alpha channel");
                              
                                  const { pixels, ...restSourceImageParameters } = sourceImage;
                              Severity: Minor
                              Found in packages/doorman/src/image-operations/negate-image.ts - About 25 mins 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 buildRateLimitConfig has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export const buildRateLimitConfig = (redis: Redis): RateLimitPluginOptions => ({
                                  // Apply the rate limit setting to all routes within the encapsulation scope
                                  global: true,
                              
                                  // The maximum number of 429 responses to return to a single client before returning 403
                              Severity: Minor
                              Found in apps/authproxy/src/auth/rate-limit.ts - About 25 mins 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 addTransitions has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public addTransitions(transitionFunction: Transitions<State, EventData>): void {
                                      for (const from of transitionFunction.fromStates) {
                                          for (const to of transitionFunction.toStates) {
                                              if (!this._canGo(from, to)) {
                                                  this._transitionFunctions.push(new TransitionFunction<State, EventData>(this, from, to));
                              Severity: Minor
                              Found in packages/bitprints/src/fsm.ts - About 25 mins 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