Showing 711 of 1,553 total issues
Function intersectVisibleObject
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Raycaster.prototype.intersectVisibleObject = function (
gfxObj,
camera,
clipPlane,
fogFarPlane
Function enable
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
enable(gfx) {
if (!gfx) {
logger.warn("WebVR couldn't be enabled, because gfx is not defined")
return
}
Function _Remark350
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
_Remark350(result) {
if (!this._source.units) {
return
}
const { units } = this._source
Function _extractATOM
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
_extractATOM(result) {
if (!this._source._atoms) {
return
}
const atoms = this._source._atoms
Function _extractSGroup
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
_extractSGroup(molecule, moleculeArr) {
if (!Array.isArray(moleculeArr)) {
moleculeArr = []
}
Function parseSync
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
parseSync() {
/* Create "Complex" variable */
const result = (this._complex = new Complex())
/* Parse input file line-by-line */
const reader = new GROReader(this._data)
Function _setBoxParams
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
_setBoxParams(xaxis, yaxis, zaxis) {
// if axes are not orthogonal, the origins might not match with box coordinates - need to make shift
let shiftX = 0
let shiftY = 0
const [alpha, beta, gamma] = this._header.angles
Function _rebuildObjects
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
_rebuildObjects() {
const self = this
const gfx = this._gfx
let i
let n
Function _export
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
_export(format) {
const TheExporter = head(io.exporters.find({ format }))
if (!TheExporter) {
this.logger.error('Could not find suitable exporter for this source')
return Promise.reject(
Function onError
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function onError(err) {
const doc = document.createDocumentFragment()
const containers = document.getElementsByClassName('miew-container')
const parent = containers.length > 0 ? containers[0] : null
- 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 _initSelectionPanel
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Menu.prototype._initSelectionPanel = function () {
const self = this
const selectionPanel = $(
`${self._menuId} [data-panel-type=miew-menu-panel-selection]`
)
- 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 _calcChunksList
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
_calcChunksList(mask, innerOnly) {
const chunksList = []
const { bonds } = this._selection
const chunksToIdx = this._chunksIdc
for (let i = 0, n = chunksToIdx.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 updateToFrame
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
updateToFrame(frameData) {
// This method looks like a copy paste. However, it
// was decided to postpone animation refactoring until GFX is fixed.
const opts = this._mode.getLabelOpts()
const atomsIdc = this._selection.chunks
- 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 buildNormals
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
buildNormals(numVertices, vertices, normals) {
const self = this
let numCloseAtoms = 0
let vx = 0
let vy = 0
- 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 addPair
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
addPair(indexA, indexB) {
const ia = indexA < indexB ? indexA : indexB
const ib = indexA > indexB ? indexA : indexB
const codeToAdd = ia + (ib << cMaxNeighbours)
- 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 _tryBond
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
_tryBond(prevBond, currRight, currDir) {
const bondsOrder = []
const bondsData = this._bondsData
const currLeft = _anotherAtom(prevBond, currRight)
const currVec = currRight.position.clone().sub(currLeft.position)
- 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 _parseSTRUCTURE
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
_parseSTRUCTURE(stream, pars, adder) {
const startId = 0
const startIndex = 1
const endId = 2
const endIndex = 3
- 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 _extractATOM
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
_extractATOM(result) {
if (!this._source._atoms) {
return
}
const atoms = this._source._atoms
- 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 _rebuidBondIndexes
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
_rebuidBondIndexes(atoms, bonds) {
const count = atoms.length
for (let i = 0; i < count; i++) {
const atomId = atoms[i].id
- 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 resolveSourceShortcut
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function resolveSourceShortcut(source, opts) {
if (!isString(source)) {
return source
}
- 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"