Showing 333 of 1,891 total issues
Function __endShape
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const __endShape = (
ctx: CanvasRenderingContext2D,
attribs: IObjectOf<any>,
doFill = true
) => {
- Read upRead up
- Create a ticketCreate a ticket
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 shuffle
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
shuffle(iter?: number, rnd: IRandom = SYSTEM) {
if (this._length < 2) return this;
for (
iter =
iter !== undefined
- Read upRead up
- Create a ticketCreate a ticket
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 next
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
next(x: A) {
if (this.state < State.DONE) {
let tx;
if (this.transferables) {
tx = this.transferables(x);
- Read upRead up
- Create a ticketCreate a ticket
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 __normalizeArray
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const __normalizeArray = (
tree: any[],
opts: Partial<HDOMOpts>,
ctx: any,
path: number[],
- Read upRead up
- Create a ticketCreate a ticket
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 read
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
read(wordSize = 1, safe = true): number {
if (wordSize > 32) {
return this.read(wordSize - 32, safe) * U32 + this.read(32, safe);
} else if (wordSize > 8) {
let out = 0;
- Read upRead up
- Create a ticketCreate a ticket
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 write
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
write(x: number, wordSize = 1) {
if (wordSize > 32) {
let hi = Math.floor(x / U32);
this.write(hi, wordSize - 32);
this.write(x - hi * U32, 32);
- Read upRead up
- Create a ticketCreate a ticket
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 solveCubic
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const solveCubic = (
a: number,
b: number,
c: number,
d: number,
- Read upRead up
- Create a ticketCreate a ticket
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 image
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const image = (
ctx: CanvasRenderingContext2D,
_: IObjectOf<any>,
{ width, height }: IObjectOf<any>,
img:
- Read upRead up
- Create a ticketCreate a ticket
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 renameTransformedKeys
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const renameTransformedKeys = <T extends object, K extends keyof T>(
src: Nullable<T>,
keys: Record<K, PropertyKey | [PropertyKey, Fn2<any, T, any>]>
) => {
if (!src) return {};
- Read upRead up
- Create a ticketCreate a ticket
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 insert
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
insert(i: number): Maybe<T> {
if (!this._length) {
return i === 0 ? this.add() : undefined;
}
const q = <CellVec<T>>this.nth(i);
- Read upRead up
- Create a ticketCreate a ticket
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 __complexComponent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const __complexComponent = (tree: any[]): CompiledComponent => ({
async mount(parent: ParentNode, index: NumOrElement = -1) {
this.subs = [];
const attribs = { ...tree[1] };
__walk((x, path) => {
- Read upRead up
- Create a ticketCreate a ticket
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 partitionSync
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function partitionSync<T>(...args: any[]): any {
const iter = __iter(partitionSync, args, iterator);
if (iter) return iter;
const {
- Read upRead up
- Create a ticketCreate a ticket
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 blit2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
dest: any[],
dpos: ArrayLike<number>,
dsize: ArrayLike<number>,
src: ArrayLike<any>,
ssize: ArrayLike<number>,
- Create a ticketCreate a ticket
Function permutations
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function* permutations(...src: any[]): IterableIterator<any[]> {
const n = src.length - 1;
if (n < 0) {
return;
}
- Read upRead up
- Create a ticketCreate a ticket
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 withSDFModifiers
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const withSDFModifiers = (fn: SDFn, mods: Partial<SDFModifiers>) => {
const {
abs: $abs,
flip: $flip,
offset: $offset,
- Read upRead up
- Create a ticketCreate a ticket
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 sample2d
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const sample2d = (
sdf: SDFn,
{ pos: [px, py], size: [width, height] }: AABBLike,
[resX, resY]: ReadonlyVec,
domain?: Fn<ReadonlyVec, Vec>,
- Read upRead up
- Create a ticketCreate a ticket
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 normRange3d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
nx: number,
ny: number,
nz: number,
includeLastX = true,
includeLastY = true,
- Create a ticketCreate a ticket
Function __kernelLookup1d
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const __kernelLookup1d = (
src: ArrayLike<number>,
x: number,
width: number,
wrap: boolean,
- Read upRead up
- Create a ticketCreate a ticket
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 topoSort
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const topoSort = <T>(
nodes: IObjectOf<T>,
deps: Fn2<T, string, Nullable<string[]>>
) => {
const cycles: IObjectOf<boolean> = {};
- Read upRead up
- Create a ticketCreate a ticket
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 $reduce
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
$reduce<T>(
rfn: ReductionFn<number, T>,
acc: T | Reduced<T>
): T | Reduced<T> {
const step = this.step;
- Read upRead up
- Create a ticketCreate a ticket
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"