Showing 711 of 1,553 total issues
Function resolveURL
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function resolveURL(str) {
if (typeof URL !== 'undefined') {
try {
if (typeof window !== 'undefined') {
return new URL(str, window.location).href;
- 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 shotDownload
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function shotDownload(dataUrl, filename) {
if (!dataUrl || dataUrl.substr(0, 5) !== 'data:') {
return;
}
if (!filename) {
- 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 shotDownload
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function shotDownload(dataUrl, filename) {
if (!dataUrl || dataUrl.substr(0, 5) !== 'data:') {
return;
}
if (!filename) {
- 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 resolveURL
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function resolveURL(str) {
if (typeof URL !== 'undefined') {
try {
if (typeof window !== 'undefined') {
return new URL(str, window.location).href
- 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 _message
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Logger.prototype._message = function (priority, message) {
if (priority < this._priority) {
return
}
const level = findKey(priorities, (value) => value === priority)
- 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 getSubset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getSubset(mask, innerOnly) {
const totalSubset = []
const { children } = this
let meshIdx = 0
for (let i = 0, n = children.length; i < n; ++i) {
- 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 shotDownload
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function shotDownload(dataUrl, filename) {
if (!dataUrl || dataUrl.substr(0, 5) !== 'data:') {
return
}
if (!filename) {
- 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 _build
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_build() {
const { residues, parent } = this._selection
const mode = this._mode
const colorer = this._colorer
const geo = this._geo
- 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 buildGeometry
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
buildGeometry(complex, colorer, mask, material) {
const polyComplexity = this.opts.polyComplexity
? this.opts.polyComplexity[this.settings.now.resolution]
: 0
const groupList = this.depGroups
- 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 resolveURL
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function resolveURL(str) {
if (typeof URL !== 'undefined') {
try {
if (typeof window !== 'undefined') {
return new URL(str, window.location).href
- 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 getSubset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getSubset(mask, innerOnly) {
const totalSubset = []
const { children } = this
let meshIdx = 0
for (let i = 0, n = children.length; i < n; ++i) {
- 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 getSubset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getSubset(mask, innerOnly) {
const totalSubset = []
const { children } = this
let meshIdx = 0
for (let i = 0, n = children.length; i < n; ++i) {
- 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 _addCut
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_addCut(ptsCount, ringsCount, chunkStartIdx) {
// Nothing to do if item is flat or only line
if (ptsCount < 3 || ringsCount < 2) {
return
}
- 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 _fromGeo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_fromGeo(geoOut) {
let colors = null
const positions = utils.allocateTyped(
Float32Array,
(1 + 2) * geoOut._numVertices
- 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 propagateColor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function propagateColor(color, rule) {
let result
if (Object.hasOwn(colorMappings, rule)) {
result = utils.hexColor(colorMappings[rule](color))
} else {
- 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 _setSlopeNormals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_setSlopeNormals(ptsCount, ringsCount, chunkStartIdx) {
const normals = this._normals
const nPtsInRing = ptsCount * VEC_SIZE
let vtxIdx = chunkStartIdx
- 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 _countNormalsInRing
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_countNormalsInRing(ptsCount, vtxIdx, isSlope, shiftToExtraPt) {
const tmpShape = this._tmpShape
const normals = this._normals
tmpShape[0].fromArray(this._positions, vtxIdx)
- 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 getSubset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getSubset(mask, innerOnly) {
const totalSubset = []
const { children } = this
let meshIdx = 0
for (let i = 0, n = children.length; i < n; ++i) {
- 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 getSubset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getSubset(mask, innerOnly) {
const totalSubset = []
const { children } = this
let meshIdx = 0
for (let i = 0, n = children.length; i < n; ++i) {
- 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 _addPointsForLoneResidue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function _addPointsForLoneResidue(centerPoints, topPoints, idx, residue) {
const nucleic = (residue._type.flags & ResidueType.Flags.NUCLEIC) !== 0
const nameFrom = nucleic ? "C5'" : 'N'
const nameTo = nucleic ? "C3'" : 'C'
- 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"