Showing 365 of 1,902 total issues
Avoid deeply nested control flow statements. Open
if (opts.rapids) rapids.push(pts);
- Create a ticketCreate a ticket
Function mixin
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const mixin = (behaviour: any, sharedBehaviour: any = {}) => {
const instanceKeys = Reflect.ownKeys(behaviour);
const sharedKeys = Reflect.ownKeys(sharedBehaviour);
const typeTag = Symbol("isa");
- 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 watchInputs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const watchInputs = (paths: string[], logger: ILogger) => {
const close = () => {
logger.info("closing watchers...");
inputs.forEach((i) => i.watcher.close());
};
- 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 vecIterator
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
ctor: VectorConstructor<T>,
buf: NumericArray,
num: number,
start: number,
cstride: number,
- Create a ticketCreate a ticket
Function implementations
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const implementations = (
id: PropertyKey,
rels: IObjectOf<MultiFn<any>[]>,
...impls: (MultiFn<any> | Implementation<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 formatAttribs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const formatAttribs = (attribs: Partial<Node | Edge>) => {
const acc: string[] = [];
for (let a in attribs) {
let v = attribs[a];
switch (a) {
- 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 positions
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
*positions() {
const { data, n } = this;
for (let i = 0; i < n; i += 8) {
const x = data[i >>> 3];
if (!x) continue;
- 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 buttonRaw
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const buttonRaw = (
gui: IMGUI,
id: string,
shape: IShape,
hash: Hash,
- 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
Avoid deeply nested control flow statements. Open
if (z > 0) {
let py = prevZ[y];
if (
distSq3(py[x], q) < sep ||
(x > 0 && distSq3(py[x - 1], q) < sep) ||
- Create a ticketCreate a ticket
Function closestT
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
closestT(p: ReadonlyVec) {
const { index, points } = this;
const tmp: Vec = [];
const closest: Vec = [];
let minD = 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 units
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const units = (
x: number,
unit: Precision | LocaleUnit,
isDativ = false,
unitsOnly = false
- 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
Avoid deeply nested control flow statements. Open
if (
distSq2(prevY[x], q) < sep ||
(x > 0 && distSq2(prevY[x - 1], q) < sep) ||
(x < sx1 && distSq2(prevY[x + 1], q) < sep)
)
- Create a ticketCreate a ticket
Function align
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const align = (
bitOffset: number,
type: keyof typeof TYPES | "union" | "struct",
spec: any
): 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
Avoid deeply nested control flow statements. Open
if (x > 0 && distSq3(currY[x - 1], q) < sep) continue;
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (y > 0) {
if (
distSq3(prevY[x], q) < sep ||
(x > 0 && distSq3(prevY[x - 1], q) < sep) ||
(x < sx1 && distSq3(prevY[x + 1], q) < sep)
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (c !== undefined) {
res[j++] = c;
}
- Create a ticketCreate a ticket
Function coerce
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const coerce = (x: any, isec = false) =>
isArray(x)
? isec
? intersect(x)
: (y: any) => x.includes(y)
- 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 releaseTree
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const releaseTree = (tree: any) => {
if (isArray(tree)) {
let x: any;
if ((x = tree[1]) && x.__release === false) {
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 qualifiedID
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const qualifiedID = (prefixes: Prefixes, id: string) => {
if (id[0] === "<" && id[id.length - 1] === ">") {
return id.substring(1, id.length - 1);
}
if (id.indexOf(":") !== -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 minError
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const minError = <T>(
fn: (x: number) => T,
error: (p: T, q: T) => number,
q: T,
res = 16,
- 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"