Showing 333 of 1,891 total issues
Function diffTree
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
diffTree(opts, parent, prev, curr, child?) {
- Create a ticketCreate a ticket
Function halton
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* halton(base: number) {
let n = 0;
let d = 1;
let invB = 1 / base;
while (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 Symbol.iterator
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
*[Symbol.iterator]() {
const queue: [string, MultiTrie<K, V>][] = [["", this]];
while (queue.length) {
const [prefix, node] = queue.pop()!;
if (node.vals) {
- 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 __iterate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const __iterate = <A, B>(
index: Map<A, B>,
keys: Iterable<A>,
fail: 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 group
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
group: ($: Group) => {
const { attribs, children } = $;
const attr = { ...DEFAULT_ATTRIBS, ...__sdfAttribs(attribs) };
__validateAttribs(attr);
const $children = children.map(asSDF);
- 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 fillRange
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const fillRange = <T extends NumericArray>(
buf: T,
index = 0,
start = 0,
end = buf.length,
- 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 delete
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
delete(prefix: string) {
const n = prefix.length;
if (n < 1) return false;
const path: TrieMap<T>[] = [];
const key: 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 doQuery
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected doQuery<T>(
fn: Fn<Pair<K, V>, T>,
k: K,
r: number,
limit = Infinity,
- 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 timeIndex
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected timeIndex(t: number) {
const stops = this.stops;
const n = stops.length;
if (n < 256) {
for (let i = n; i-- > 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 seq
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
<T>(parsers: Parser<T>[], id = "seq"): Parser<T> =>
(ctx) => {
if (ctx.done) return false;
ctx.start(id);
for (let i = 0, n = parsers.length; i < n; 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 concatA
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const concatA = <T>(...args: Nullable<ArrayLike<T>>[]) => {
const seqs: ArrayLike<T>[] = [];
for (let i = 0, n = args.length; i < n; i++) {
const x = args[i];
x && x.length && seqs.push(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 alt
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
<T>(parsers: Parser<T>[]): Parser<T> =>
(ctx) => {
if (ctx.done) return false;
for (let i = 0, n = parsers.length; i < n; i++) {
if (parsers[i](ctx)) {
- 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 range3d
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* range3d(
...args: number[]
): IterableIterator<[number, number, number]> {
let fromX!: number, toX!: number, stepX!: number;
let fromY!: number, toY!: number, stepY!: 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 wrapSides
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* wrapSides<T>(
src: Iterable<T>,
numLeft = 1,
numRight = numLeft
): IterableIterator<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 polyline
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* polyline(
pts: ReadonlyVec[],
opts: Partial<PolylineOpts> = {}
): IterableIterator<DrawCommand> {
if (!pts.length) 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 xfNest
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
(parser: Parser<string>): ScopeTransform<string> =>
(scope, ctx) => {
if (!scope) return;
const src = scope.result || xfJoin(scope.copy())!.result;
const inner = defContext(src, ctx.opts);
- 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 __pathFromCubics
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const __pathFromCubics = <P extends IPath<any>, S extends P["segments"][0]>(
ctor: PathConstructor<P, S>,
cubics: S["geo"][],
attribs?: Attribs
): 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 radio
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const radio = ({
gui,
layout,
id,
horizontal,
- 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 svgDoc
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const svgDoc = (
attribs: Partial<SVGDocAttribs>,
...shapes: IShape[]
) => {
let $attribs = { ...SVG_DEFAULT_ATTRIBS, ...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 scatter
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const scatter = (
shape: IShape,
num: number,
rnd: IRandom = SYSTEM,
out: 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"