thi-ng/umbrella

View on GitHub

Showing 333 of 1,883 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
) => {
Severity: Minor
Found in packages/hiccup-canvas/src/internal/end-shape.ts - About 55 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 __files has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function* __files(
    dir: string,
    match: string | RegExp | Predicate<string> = "",
    logger?: ILogger,
    maxDepth = Infinity,
Severity: Minor
Found in packages/file-io/src/files.ts - About 55 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 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);
Severity: Minor
Found in packages/bitstream/src/output.ts - About 55 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 __normalizeArray has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

const __normalizeArray = (
    tree: any[],
    opts: Partial<HDOMOpts>,
    ctx: any,
    path: number[],
Severity: Minor
Found in packages/hdom/src/normalize.ts - About 55 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 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);
Severity: Minor
Found in packages/rstream/src/tunnel.ts - About 55 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 solveCubic has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export const solveCubic = (
    a: number,
    b: number,
    c: number,
    d: number,
Severity: Minor
Found in packages/math/src/solve.ts - About 55 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 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;
Severity: Minor
Found in packages/bitstream/src/input.ts - About 55 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 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
Severity: Minor
Found in packages/dcons/src/dcons.ts - About 55 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 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 {};
Severity: Minor
Found in packages/object-utils/src/rename-keys.ts - About 55 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 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:
Severity: Minor
Found in packages/hiccup-canvas/src/image.ts - About 55 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 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);
Severity: Minor
Found in packages/vector-pools/src/linked-list.ts - About 55 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 __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) => {
Severity: Minor
Found in packages/rdom/src/compile.ts - About 45 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 normRange3d has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    nx: number,
    ny: number,
    nz: number,
    includeLastX = true,
    includeLastY = true,
Severity: Minor
Found in packages/transducers/src/norm-range.ts - About 45 mins to fix

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;
Severity: Minor
Found in packages/transducers/src/range.ts - About 45 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 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,
Severity: Minor
Found in packages/geom-sdf/src/ops.ts - About 45 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 blit2d has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    dest: any[],
    dpos: ArrayLike<number>,
    dsize: ArrayLike<number>,
    src: ArrayLike<any>,
    ssize: ArrayLike<number>,
Severity: Minor
Found in packages/arrays/src/blit.ts - About 45 mins to fix

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 {
Severity: Minor
Found in packages/transducers/src/partition-sync.ts - About 45 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 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> = {};
Severity: Minor
Found in packages/arrays/src/topo-sort.ts - About 45 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 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;
    }
Severity: Minor
Found in packages/transducers/src/permutations.ts - About 45 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 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>,
Severity: Minor
Found in packages/geom-sdf/src/sample.ts - About 45 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