Showing 100 of 824 total issues
Avoid too many return
statements within this function. Open
return logger.fatal(new Error("Bad server response"));
Avoid too many return
statements within this function. Open
return ImageType.Other;
Avoid too many return
statements within this function. Open
return logger.fatal(new Error("Bad server response"));
Avoid too many return
statements within this function. Open
return copyArrayToJs(object as unknown as Il2Cpp.Array<Il2Cpp.Object>).map((value) => readObject(value));
Avoid too many return
statements within this function. Open
return copyListToJs<Il2Cpp.Object>(object).map((value) => readObject(value));
Avoid too many return
statements within this function. Open
return undefined;
Avoid too many return
statements within this function. Open
return undefined;
Avoid too many return
statements within this function. Open
return logger.fatal(new Error("Bad server response"));
Avoid too many return
statements within this function. Open
if (string === "") return "__Empty String__";
Avoid too many return
statements within this function. Open
return logger.fatal(new Error("Bad server response"));
Avoid too many return
statements within this function. Open
return {
bitbookPostBlocks: bitbookPostBlocks,
bitizenBlocks: bitizenBlocks,
blocks: blocks,
floorBlocks: floorBlocks,
Avoid too many return
statements within this function. Open
return undefined;
Avoid too many return
statements within this function. Open
return serverResponse;
Avoid too many return
statements within this function. Open
return 0;
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>;
- Read upRead up
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
- Read upRead up
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);
- Read upRead up
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;
- Read upRead up
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
- Read upRead up
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));
- Read upRead up
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"