Showing 711 of 1,553 total issues
Function setValues
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
setValues(values) {
if (typeof values === 'undefined') {
return
}
Function finalize
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
finalize(opts) {
opts = opts || {}
// Put bonds into atoms
const bonds = this._bonds
let 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 prepareComponentCompound
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
function prepareComponentCompound(data) {
let atoms = []
if (
data.molecule &&
data.molecule.atomArray &&
Function constructor
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(opts: MiewOptions) {
super()
this._opts = merge(
{
settingsCookie: 'settings',
Function H
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
function H(r) {
function t(r) {
for (var t = {}, n = 0; r > n; n++) {
var e = o()
t[e] = o()
Function finalize
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
finalize(opts) {
opts = opts || {}
// Put bonds into atoms
const bonds = this._bonds
let i
Function _extractAtoms
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
_extractAtoms(complex, complexData) {
const atomData = complexData.atom_site
if (!atomData) {
throw new AtomDataError('CIF parsing error: atom_site is not specified!')
}
Function _calcHBondEnergy
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
_calcHBondEnergy(predonor, donor, acceptor) {
let result = 0
if (predonor === null) {
return result
Function propagateProp
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
propagateProp(path, arg) {
if (path !== undefined) {
let argExc = {}
const adapter = options.adapters[typeof get(settings.defaults, path)]
if (adapter === undefined) {
- 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 a Cognitive Complexity of 23 (exceeds 5 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
- 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 _buildVW
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
_buildVW() {
const self = this
const residues = this._complex._residues
let ri
let preri
- 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
File FBXInfoExtractor.js
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
import utils from '../../../utils'
import gfxutils from '../../../gfx/gfxutils'
import logger from '../../../utils/logger'
import FBXModel from './FBXModel'
Function buildGeoFromCorners
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildGeoFromCorners(meshRes, vBoxMin, vBoxMax, corners, vCellStep, cube) {
const arrSize = 12
const cNumVerts = 8
const numCells = meshRes - 1
const side = meshRes
Function default
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function (webVRPoC) {
function showEnterVR(button) {
button.style.display = ''
button.style.cursor = 'pointer'
button.style.left = 'calc(50% - 50px)'
Function _updateInfo
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._updateInfo = function (dataSource) {
if (dataSource && dataSource.id !== 'Complex') {
return
}
const complex = dataSource
Function _extractSGroups
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
_extractSGroups(molecule, atoms) {
const moleculeArr = this._extractSGroup(molecule)
const count = atoms.length
let i
Function _onLoad
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
_onLoad(dataSource, opts) {
const gfx = this._gfx
let visualName = null
if (opts.animation) {
File VoxelWorld.js
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
import utils from '../utils'
import { Vector2, Vector3 } from 'three'
/**
* Calculate min & max radius of a sphere slice between zMin & zMax
Function calculateGridCorners
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
calculateGridCorners(corners, side, vBoxMin, vBoxMax, atoms, probeRad) {
const side2 = side * side
const side3 = side2 * side
const vCorner = new Vector3()
const vDif = new Vector3()
- 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 buildTiledTexture
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
buildTiledTexture() {
let tilesX = Math.ceil(Math.sqrt((this._dimZ * this._dimY) / this._dimX))
let width = tilesX * (this._dimX + 2) - 1
width = pow2ceil(width)
- 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"