thi-ng/umbrella

View on GitHub

Showing 333 of 1,891 total issues

Function typedef has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export const typedef = (
    spec: Field[],
    struct: boolean,
    buf?: ArrayBuffer | null,
    offset = 0,
Severity: Minor
Found in packages/unionstruct/src/index.ts - About 25 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 6 (exceeds 5 allowed). Consider refactoring.
Open

function* __group(
    $: Group,
    opts?: Partial<AsAxiDrawOpts>
): IterableIterator<DrawCommand> {
    const $sampleOpts = __sampleAttribs(opts?.samples, $.attribs);
Severity: Minor
Found in packages/geom-axidraw/src/as-axidraw.ts - About 25 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 equiv has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    equiv(o: any) {
        if (this === o) {
            return true;
        }
        if (!(o instanceof Set) || this.size !== o.size) {
Severity: Minor
Found in packages/sparse-set/src/index.ts - About 25 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 parseHtml has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export const parseHtml = (
    src: string,
    opts?: Partial<ParseOpts>
): ParseResult => {
    if (!src) return { type: "success", result: [] };
Severity: Minor
Found in packages/hiccup-html-parse/src/index.ts - About 25 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 __queryFFNPartial has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

const __queryFFNPartial: QueryImpl = (res, db: any, s, p) => {
    for (let $s in db) {
        if ((<FTerm>s)($s)) {
            const sval = db[$s];
            for (let $p in sval) {
Severity: Minor
Found in packages/oquery/src/query.ts - About 25 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 easeOutBounce has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export const easeOutBounce: FnN = (t) =>
    t < 1 / 2.75
        ? 7.5625 * (t * t)
        : t < 2 / 2.75
        ? 7.5625 * (t - 1.5 / 2.75) * (t - 1.5 / 2.75) + 0.75
Severity: Minor
Found in packages/math/src/easing.ts - About 25 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 easeInOutExp2 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export const easeInOutExp2: FnN = (t) =>
    t < 0
        ? 0
        : t >= 1
        ? 1
Severity: Minor
Found in packages/math/src/easing.ts - About 25 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 slice has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    slice(from = 0, to = this.length) {
        let a = from < 0 ? from + this._length : from;
        let b = to < 0 ? to + this._length : to;
        if (a < 0 || b < 0) {
            illegalArgs("invalid indices: ${from} / ${to}");
Severity: Minor
Found in packages/dcons/src/dcons.ts - About 25 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 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected _write(x: number, wordSize: number) {
        x &= (1 << wordSize) - 1;
        let buf = this.buffer;
        let pos = this.pos;
        let bit = this.bit;
Severity: Minor
Found in packages/bitstream/src/output.ts - About 25 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 easeInOutElastic has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export const easeInOutElastic: FnN = (t) =>
    t <= 0
        ? 0
        : t >= 1
        ? 1
Severity: Minor
Found in packages/math/src/easing.ts - About 25 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 fromIterable has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export const fromIterable = <T>(
    src: Iterable<T>,
    opts: Partial<FromIterableOpts> = {}
) =>
    stream<T>((stream) => {
Severity: Minor
Found in packages/rstream/src/iterable.ts - About 25 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 mergeMap has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export const mergeMap = <K, V>(
    dest: Map<K, V>,
    ...maps: Nullable<Map<K, V>>[]
) => {
    for (let x of maps) {
Severity: Minor
Found in packages/object-utils/src/merge.ts - About 25 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 transclude has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export const transclude = <T>(
    ctx: SomeRequired<TranscludeCtx<T>, Mandatory>,
    path: string
) => {
    const $ctx: TranscludeCtx<T> = {
Severity: Minor
Found in packages/transclude/src/transclude.ts - About 25 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