Showing 711 of 1,553 total issues
Function deriveDeep
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function deriveDeep(obj, needZeroOwnProperties) {
let res = obj
let i
let n
if (obj instanceof Array) {
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
_build() {
const bondsIdc = this._selection.chunks
const { bonds, parent } = this._selection
const mode = this._mode
const colorer = this._colorer
- 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 deriveDeep
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function deriveDeep(obj, needZeroOwnProperties) {
let res = obj
let i
let n
if (obj instanceof Array) {
- 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 vertexFusion
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
vertexFusion(offset, len) {
const faceVer = this._indices.length
const vertices = this._position
const normals = this._normals
const oldVerCount = vertices.length | 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 screenshot
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
screenshot(width, height) {
const gfx = this._gfx
const deviceWidth = gfx.renderer.domElement.width
const deviceHeight = gfx.renderer.domElement.height
- 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 _extractConfs
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
_extractConfs(complex, helicesData) {
const { asymDict } = this
if (
!helicesData.conf_type_id ||
!helicesData.beg_label_seq_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 constructor
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(
AromaticGroup,
geoParams,
complex,
colorer,
Function getNumIntersectedCells
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
getNumIntersectedCells(side, numCells, corners, cube) {
const side2 = side * side
const cNumVerts = 8
let numIntersectedCells = 0
Function _prepareAxesAndDirs
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
_prepareAxesAndDirs() {
const volData = this._volumetricData
const cellSize = volData.getCellSize()
Function _fromGeo
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
_fromGeo(geoOut) {
let colors = null
const positions = utils.allocateTyped(
Float32Array,
(1 + 2) * geoOut._numVertices
Function load
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
load(source, opts) {
opts = merge({}, opts, {
context: this
})
Function propagateProp
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
propagateProp(path, arg) {
if (path !== undefined) {
let argExc = {}
const adapter = options.adapters[typeof get(settings.defaults, path)]
if (adapter === undefined) {
Function mousedown
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
ObjectControls.prototype.mousedown = function (event) {
if (this.enabled === false || this._state !== STATE.NONE) {
return
}
Function computeGradient
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
computeGradient() {
if (this._dimVec !== 1) {
// gradient can only be computed for scalar fields
return null
}
Function writeString
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
writeString(string, begin, end) {
let curStr = this._resultArray[this._currentStr]
let str
const curStrLength = curStr ? curStr.length : 0
Consider simplifying this complex logical expression. Open
if (
xDir.x < 0 ||
xDir.y < 0 ||
xDir.z < 0 ||
yDir.x < 0 ||
Function constructor
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(
ResidueGroup,
geoParams,
complex,
colorer,
Function _addPointsForLoneResidue
has 41 lines of code (exceeds 25 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'
Function _breadWidthSearch
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
_breadWidthSearch(atoms, molID) {
const atomLabels = new Array(atoms.length)
let id
for (id = 0; id < atomLabels.length; id++) {
Function initializeTerminal
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initializeTerminal(viewer) {
const _terminal = $('.miew-terminal')
const _terminalWindow = _terminal.find('.terminal-window')
_terminalWindow.terminal(
function (command, term) {