Showing 711 of 1,553 total issues
Function _calcHBondEnergy
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
_calcHBondEnergy(predonor, donor, acceptor) {
let result = 0
if (predonor === null) {
return result
- 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 updateSelectionMask
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
updateSelectionMask(pickedObj) {
const self = this
const { atom } = pickedObj
let { residue, chain, molecule } = pickedObj
const setMask = 1 << this._selectionBit
- 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 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
_parseSTRUCTURE(stream, pars, adder) {
const startId = 0
const startIndex = 1
const endId = 2
const endIndex = 3
File Residue.js
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
import Atom from './Atom'
import Element from './Element'
import { Vector3 } from 'three'
const cNucleicControlNames = ["C3'", 'C3*', 'P', 'H5T', 'H3T']
Function _fillCombo
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._fillCombo = function (type, name, path, entityList) {
const self = this
const frag = document.createDocumentFragment()
let newItem
Function _renderObject
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderObject(object, camera, scene) {
function lerpColorAsHex(a, b, t) {
tempColor.setHex(a)
tempColor.lerp(b, t)
return `#${tempColor.getHexString()}`
Function _performAO
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
_performAO(
srcColorBuffer,
normalBuffer,
srcDepthTexture,
targetBuffer,
File selectArgs.test.js
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
import chai, { expect } from 'chai'
import dirtyChai from 'dirty-chai'
import { Range, RangeList, ValueList } from './selectArgs'
chai.use(dirtyChai)
Function getMiewWithCli
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getMiewWithCli = (miewInstance) => {
const obj = Object.create(miewInstance)
obj.script = function (script, _printCallback, _errorCallback) {
parsercli.yy.miew = obj
Function RepresentationMap
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
var RepresentationMap = function () {
function RepresentationMap() {
_classCallCheck(this, RepresentationMap);
this.representationMap = {};
this.representationID = {};
- 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 RepresentationMap
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
var RepresentationMap = function () {
function RepresentationMap() {
_classCallCheck(this, RepresentationMap);
this.representationMap = {};
this.representationID = {};
- 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 getNumIntersectedCells
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
getNumIntersectedCells(side, numCells, corners, cube) {
const side2 = side * side
const cNumVerts = 8
let numIntersectedCells = 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 _renderObject
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
_renderObject(object, camera, scene) {
function lerpColorAsHex(a, b, t) {
tempColor.setHex(a)
tempColor.lerp(b, t)
return `#${tempColor.getHexString()}`
- 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 _breadWidthSearch
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
_breadWidthSearch(atoms, molID) {
const atomLabels = new Array(atoms.length)
let id
for (id = 0; id < atomLabels.length; 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 _extractSGroup
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
_extractSGroup(molecule, moleculeArr) {
if (!Array.isArray(moleculeArr)) {
moleculeArr = []
}
- 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 _extractOperations
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function _extractOperations(assemblyGen, opsDict) {
assemblyGen = isString(assemblyGen) ? assemblyGen : `${assemblyGen}`
const l = assemblyGen.replace(/\)\s*\(/g, '!').replace(/[()']/g, '')
const groupStr = l.split('!')
const gps = []
- 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 gaussdensity
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
gaussdensity(surface, packedArrays, atomicNum, params) {
const numAtoms = packedArrays.posRad.length / 4
const { posRad, colors } = packedArrays
const { numVoxels } = this
const { radScale, gaussLim, gridSpacing } = params
Function _init
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
_init(instanceCount, cylinderGeo, useZSprites) {
this.copy(cylinderGeo)
this._matVector1 = utils.allocateTyped(
Float32Array,
instanceCount * OFFSET_SIZE
Function _extractConfs
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
_extractConfs(complex, helicesData) {
const { asymDict } = this
if (
!helicesData.conf_type_id ||
!helicesData.beg_label_seq_id ||
Function projectPoints
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function projectPoints() {
// For each atom:
// Iterate over a subsection of the grid, for each point:
// If current value < 0.0, unvisited, set positive
//