thi-ng/umbrella

View on GitHub

Showing 333 of 1,891 total issues

Function diffTree has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    diffTree(opts, parent, prev, curr, child?) {
Severity: Minor
Found in packages/hdom/src/default.ts - About 35 mins to fix

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) {
Severity: Minor
Found in packages/lowdisc/src/halton.ts - About 35 mins to fix

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) {
Severity: Minor
Found in packages/trie/src/multi-trie.ts - About 35 mins to fix

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
) => {
Severity: Minor
Found in packages/bidir-index/src/index.ts - About 35 mins to fix

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);
Severity: Minor
Found in packages/geom-sdf/src/as-sdf.ts - About 35 mins to fix

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,
Severity: Minor
Found in packages/arrays/src/fill-range.ts - About 35 mins to fix

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[] = [];
Severity: Minor
Found in packages/trie/src/trie-map.ts - About 35 mins to fix

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,
Severity: Minor
Found in packages/geom-accel/src/spatial-grid3.ts - About 35 mins to fix

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; ) {
Severity: Minor
Found in packages/ramp/src/ramp.ts - About 35 mins to fix

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++) {
Severity: Minor
Found in packages/parse/src/combinators/seq.ts - About 35 mins to fix

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);
Severity: Minor
Found in packages/seq/src/concat.ts - About 35 mins to fix

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)) {
Severity: Minor
Found in packages/parse/src/combinators/alt.ts - About 35 mins to fix

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;
Severity: Minor
Found in packages/transducers/src/range3d.ts - About 35 mins to fix

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> {
Severity: Minor
Found in packages/transducers/src/wrap-sides.ts - About 35 mins to fix

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;
Severity: Minor
Found in packages/axidraw/src/polyline.ts - About 35 mins to fix

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);
Severity: Minor
Found in packages/parse/src/xform/nest.ts - About 35 mins to fix

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 => {
Severity: Minor
Found in packages/geom/src/path-from-cubics.ts - About 35 mins to fix

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,
Severity: Minor
Found in packages/imgui/src/components/radio.ts - About 35 mins to fix

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 };
Severity: Minor
Found in packages/geom/src/as-svg.ts - About 35 mins to fix

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[] = []
Severity: Minor
Found in packages/geom/src/scatter.ts - About 35 mins to fix

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

Severity
Category
Status
Source
Language