Showing 711 of 1,553 total issues
Function raycast
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
raycast(raycaster, intersects) {
const ray = TransformGroup._ray
const inverseMatrix = TransformGroup._inverseMatrix
const { children } = this
ray.copy(raycaster.ray)
- Read upRead up
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 _loopThrough
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
subDiv,
residues,
segmentsHeight,
tension,
mode,
Function raycast
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
raycast(raycaster, intersects) {
const { bonds } = this._selection
const inters = []
this._mesh.raycast(raycaster, inters)
const bondsIdc = this._chunksIdc
- Read upRead up
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 setArrayXYZW
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function setArrayXYZW(arr, idx, x, y, z, w) {
Function getResidueColor
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
getResidueColor(residue, _complex) {
const { opts } = this
if (!opts) {
return this.palette.defaultGradientColor
}
- Read upRead up
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 (dx * dx + dy * dy + dz * dz <= rSum * rSum) {
out[outIdx++] = data[dataIndex]
}
Avoid deeply nested control flow statements. Open
if (!this.addTriangle(vaEdges[i0], vaEdges[i1], vaEdges[i2])) {
return 0 - 2
}
Avoid deeply nested control flow statements. Open
if (gcVal[i] < isoValue) {
cubeIndex |= 1 << i
}
Avoid deeply nested control flow statements. Open
if (this._voxelList[indVoxel] < 0) {
atomsList[numAtomsRefs * 2 + 0] = i
atomsList[numAtomsRefs * 2 + 1] = 0 - 1
this._voxelList[indVoxel] = numAtomsRefs
numAtomsRefs++
Avoid deeply nested control flow statements. Open
if (
this._visibilitySelector != null &&
density > atomWeightData[addr]
) {
// NOSONAR
Avoid deeply nested control flow statements. Open
if (d2 < ar2) {
const w = Math.exp(-d2 * sigma2Inv)
const cIdx = idx * 3
volTex[cIdx] += cr * w
volTex[cIdx + 1] += cg * w
Avoid deeply nested control flow statements. Open
if (!found) {
bridges.push({
type,
i: [ri._index],
chainI: ri.getChain()._index,
Function compareOptionsWithDefaults
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function compareOptionsWithDefaults(opts, defOpts) {
const optsStr = []
if (defOpts && opts) {
const keys = Object.keys(opts)
for (let p = 0; p < keys.length; ++p) {
- Read upRead up
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 (i0 < 0) {
break
}
Avoid deeply nested control flow statements. Open
for (let ix = minx; ix < maxx; ix++) {
dx = px - gridx[ix]
d2 = dzy2 + dx * dx
const idx = ix + zyOffset
const current = grid[idx]
Function setArrayXYZW
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function setArrayXYZW(arr, idx, x, y, z, w) {
Function _innerBuild
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
_innerBuild() {
let ok
const expandFactor = 1.2
// performance test
- Read upRead up
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 (type === BridgeType.NO_BRIDGE) {
continue
}
Function setArrayXYZW
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function setArrayXYZW(arr, idx, x, y, z, w) {
Function buildSelectionGeometry
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
buildSelectionGeometry(mask) {
let sg = null
if (this.geo && 'getSubset' in this.geo) {
const meshes = this.geo.getSubset(mask)
- Read upRead up
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"