Showing 333 of 1,891 total issues
Function traceLines
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
export const traceLines = (
opts: TraceOpts,
order: Fn<GridIterOpts2D, Iterable<[number, number]>>,
border: Predicate<[number, number]>,
tx: PointTransform2D,
- 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 deserialize
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
export const deserialize = (
src: Uint8Array | ArrayBufferLike,
start = 0,
end = src.byteLength
) => {
- 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 __findHoleBridge
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
const __findHoleBridge = (hole: Vertex, outer: Vertex): Nullable<Vertex> => {
const { x: hx, y: hy } = hole;
let v = outer;
let qx = -Infinity;
let px: number, py: 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 distanceTransform
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
export const distanceTransform = (
{
data: spix,
size: [width, height],
stride: [sx, sy],
- 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 outputProc
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
export const outputProc: Processor = async (spec, input, ctx) => {
const opts = <OutputSpec>spec;
const outDir = resolve(ctx.opts.outDir || ".");
let output = input.clone();
if (opts.blurhash) {
- 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 el
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
el: ({ children }, opts, acc) => {
const [name, { children: $attribs }, body] = children!;
if (opts.ignoreElements?.includes(name.result)) return;
const attribs: any = {};
const el: Element = [name.result, attribs];
- 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 __readFloat
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
const __readFloat = (src: string, index: number) => {
index = __skipWS(src, index);
let signOk = true;
let dotOk = true;
let expOk = false;
- 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 __sortLinked
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
const __sortLinked = (list: Nullable<Vertex>) => {
let numMerges;
let inSize = 1;
do {
- 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 circle
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
export const circle = (
canvas: Canvas,
cx: number,
cy: number,
r: 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 fillPoly
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
export const fillPoly = <T extends any[] | TypedArray, P>(
grid: IGrid2D<T, P>,
pts: ArrayLike<number>[],
val: P | Shader2D<P>
) => {
- 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 __drawInstanced
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
const __drawInstanced = (gl: WebGLRenderingContext, spec: ModelSpec) => {
const isGL2 = isGL2Context(gl);
const ext = !isGL2 ? gl.getExtension("ANGLE_instanced_arrays") : undefined;
if (!(isGL2 || ext)) {
error("instancing not supported");
- 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 list
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
list: (scope, ctx, acc) => {
const children = scope.children![0].children!;
const stack: any[][] = [
[children[0].id === "ulitem" ? "ul" : "ol"],
];
- 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 __serialize
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
const __serialize = (tree: any, ctx: any, state: SerializeState): string =>
tree == null
? ""
: Array.isArray(tree)
? __serializeArray(tree, ctx, state)
- 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 defuzz
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
export const defuzz = <I extends LVarSet<string>, O extends LVarSet<string>>(
ins: I,
outs: O,
rules: Rule<I, O>[],
vals: Partial<Record<keyof I, 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 update
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
async update(curr: T[]) {
if (!curr) return;
const { keyFn, items, ctor, cache, el: parent } = this;
const currItems: KListItem[] = [];
const currCache = new Map<NumOrString, KListItem>();
- 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 __encodeBin
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
(x: any): Type =>
isNumber(x)
? Math.floor(x) !== x
? Type.FLOAT
: Type.INT
- 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 computeDiff
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
export const computeDiff = (a: string, b: string) => {
const edits = diffArray(
a.split("\n"),
b.split("\n"),
"only-distance-linear"
- 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 fieldType
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
export const fieldType = (
f: Field,
parent: Struct | Union | FuncPointer,
coll: TypeColl,
opts: CodeGenOpts
- 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 expand
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
export const expand = (
acc: string[],
parent: any[],
rules: any[],
opts: CSSOpts
- 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 __normalizeChildren
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
const __normalizeChildren = (
norm: any[],
nattribs: any,
opts: Partial<HDOMOpts>,
ctx: any,
- 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"