Showing 333 of 1,891 total issues
Function calcCoeffs
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected calcCoeffs() {
const k = Math.tan(PI * this._freq);
const k2 = k * k;
const k22 = 2 * (k2 - 1);
const kq = k / this._q;
- 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 hasNeighborhood
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
hasNeighborhood<N extends INeighborhood<ReadonlyVec, T>>(
neighborhood: N,
opts: Partial<QueryNeighborhoodOpts> = {}
) {
const { entries, indices, items, keyFn, tableSize } = this;
- 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 _hvline
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const _hvline = (
buf: Uint32Array,
a: number,
b: number,
astride: 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 stringD
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
<T>(str: ArrayLike<T>): Parser<T> =>
(ctx) => {
if (ctx.done) return false;
const state = ctx.state.copy();
const reader = ctx.reader;
- 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 mergeClasses
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const mergeClasses = (
existing: string | SVGAnimatedString,
val: any
) => {
val = deref(val);
- 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 __laneStacking
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const __laneStacking = <T>(data: [number[], T][], pad = 0) =>
data.reduce((acc, item) => {
const rx = item[0];
for (let i = 0; true; i++) {
const row = acc[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 asPBM
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const asPBM = (buf: IntBuffer, comments?: string[]) => {
const { data, width, height } = buf;
const { dest, start, abgr } = __initHeader(
"P4",
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 roundedRect
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const roundedRect = (
pos: Vec,
[w, h]: Vec,
radii:
| 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 cropProc
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const cropProc: Processor = async (spec, input, ctx) => {
const { aspect, border, gravity, pos, size, ref, unit } = <CropSpec>spec;
if (border == null && size == null)
illegalArgs("require `border` or `size` option");
if (border != null) {
- 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 ringRaw
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const ringRaw = (
gui: IMGUI,
id: string,
x: number,
y: 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 samplePoisson
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const samplePoisson = (_opts: PoissonOpts) => {
const opts = {
rnd: SYSTEM,
iter: 1,
jitter: 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 delete
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
delete(key: K) {
const $this = __private.get(this)!;
let node: Maybe<Node<K, V>> = this.findNode(key);
if (node.k === undefined || $this.cmp(node.k, key) !== 0) return false;
// descent to lowest level
- 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 braitenberg2
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const braitenberg2 = (
field: Fn<ReadonlyVec, number>,
lookahead: number,
angle: number,
weight: ScalarOrField = 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 __applyTransform
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const __applyTransform = (
ctx: CanvasRenderingContext2D,
attribs: IObjectOf<any>
) => {
let v: any;
- 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 __resolveVarName
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const __resolveVarName = (name: string, ctx: GeneratorContext) => {
if (name.indexOf(".") == -1) return name;
let resolved = "";
for (let x of name.split(".")) {
const $name = resolved + "." + 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 utf8Decode
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const utf8Decode = (buf: Uint8Array, start: number, num: number) => {
const end = start + num;
let i = start;
let result = "";
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 __queryFFN
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const __queryFFN: QueryImpl = (res, db: any, s, p) => {
for (let $s in db) {
if ((<FTerm>s)($s)) {
const sval = db[$s];
for (let $p in sval) {
- 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 add
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
add(): T {
const v = <CellVec<T>>this.alloc();
if (v) {
if (this.tail) {
v.prev = this.tail;
- 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 nth
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
nth(n: number): Maybe<T> {
if (n < 0) {
n += this._length;
}
if (n < 0 || n >= this._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 defElement
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
<T = Partial<Attribs>, B = any>(
tag: string,
baseAttribs?: Partial<T>
): ElementFactory<T, B> =>
(...args: any[]): any => {
- 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"