Showing 333 of 1,891 total issues
Function diagonalSlopeY
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function* diagonalSlopeY(opts: DiagonalSlopeOpts) {
const { cols, rows, tx } = __opts(opts);
const maxX = cols - 1;
const slope = opts.slope | 0;
assert(slope > 0, "slope must be > 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 __earcutLinked
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const __earcutLinked = (
ear: Nullable<Vertex>,
triangles: number[][],
pred: Predicate<Vertex>,
pass = 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 __parseOpts
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const __parseOpts = <T extends IObjectOf<any>>(
specs: Args<T>,
argv: string[],
opts: Partial<ParseOpts>
): Maybe<ParseResult<T>> => {
- 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 drawRect
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const drawRect = <T extends any[] | TypedArray, P>(
grid: IGrid2D<T, P>,
x: number,
y: number,
w: 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 sutherlandHodgeman
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const sutherlandHodgeman = (
pts: ReadonlyVec[],
bounds: ReadonlyVec[],
bc?: ReadonlyVec,
eps = EPS
- 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 bquote
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
bquote: (scope, ctx, acc) => {
const stack: any[][] = [[]];
const children = scope.children![0].children!;
const $unwind = (level: 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 __parseLine
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const __parseLine = (
line: string,
acc: string[],
isQuoted: boolean,
delim: string,
- 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 utf8Encode
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const utf8Encode = (src: string, capacity?: number) => {
const n = src.length;
const buf = new Uint8Array(capacity || n << 2);
let pos = 0;
let c: 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 clipPolylineWith
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const clipPolylineWith = (
pred: Predicate2<ReadonlyVec>,
pts: ReadonlyVec[],
step = 1,
keepLast = 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 meldObjWith
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const meldObjWith = <T>(
f: Fn2<T, T, T>,
dest: IObjectOf<T>,
...objects: Nullable<IObjectOf<T>>[]
) => {
- 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 doQuery
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected doQuery(
p: K,
r: number,
max: number,
acc: Heap<[number, NdQtNode<K, V>?]>,
- 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 setAttrib
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
setAttrib(el: HDOMNode, id: string, val: any, attribs?: any) {
if (id.startsWith("__")) return;
const isListener = id.indexOf("on") === 0;
if (!isListener && typeof val === "function") {
val = val(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 toPath
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const toPath = (path: Path): readonly NumOrString[] => {
if (isArray(path)) {
if (!path.every((x) => isString(x) || isNumber(x))) __illegal(path);
return <any[]>path;
} else {
- 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 path
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
path: ($: Path, p, out) => {
let minD = Infinity;
const $closestPSegment = (segments: PathSegment[]) => {
for (let s of segments) {
if (!s.geo) continue;
- 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 computeCell
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
computeCell(
{ rule, kernel, weights, fn }: CAConfig1D,
x: number,
val: 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 convexity
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Confirmed
export const convexity = (pts: ReadonlyVec[], eps = EPS) => {
let n = pts.length;
if (n < 3) {
return n < 2 ? Convexity.ILLEGAL : Convexity.COLINEAR;
}
- 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 convolveOpen
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const convolveOpen = (
pts: ReadonlyVec[],
kernel: number[],
t = 0.5,
iter = 1
- 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 __generateFields
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const __generateFields = (
gen: ICodeGen,
parent: Struct | Union,
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 traverse
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const traverse = (
subs: ISubscribable<any>[],
opts?: Partial<DotOpts>,
state?: TraversalState
) => {
- 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 __parseKey
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const __parseKey = <T extends IObjectOf<any>>(
specs: Args<T>,
aliases: IObjectOf<string>,
acc: any,
a: string
- 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"