Showing 711 of 1,553 total issues
Function repAdd
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
repAdd(rep) {
if (this._reprList.length >= ComplexVisual.NUM_REPRESENTATION_BITS) {
return null
}
Function _extractOperations
has 38 lines of code (exceeds 25 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 = []
Function update
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
ObjectControls.prototype.update = (function () {
const shift = new Vector2()
return function () {
const curTime = this._clock.getElapsedTime()
Function mouse2rotation
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
ObjectHandler.prototype.mouse2rotation = (function () {
const center = new Vector3()
const eye = new Vector3()
const eyeDirection = new Vector3()
Function calcNormalDir
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
calcNormalDir(posGetter) {
const left = this._left
const right = this._right
let first = left
let second = right
Function _initMiewEventListeners
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._initMiewEventListeners = function () {
const self = this
this._viewer.addEventListener('loading', () => {
self._setTitle('Loading…')
Function _term
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
(command, term) => {
if (self._viewer) {
command = command.trim()
const loadStr = command.split(/\s+/)
Function computeBoundaries
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
computeBoundaries() {
const atoms = this._complex._atoms
const n = atoms.length
const selector = this._selector
Function showEnterVR
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function showEnterVR(button) {
button.style.display = ''
button.style.cursor = 'pointer'
button.style.left = 'calc(50% - 50px)'
button.style.width = '100px'
Function _parseAtoms
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
_parseAtoms(stream, atomsNum) {
let curStr
let serial = this._atomsParsed
// each molecule = chain\residue
Function _extractRepresentation
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
_extractRepresentation() {
const changed = []
this._forEachComplexVisual((visual) => {
if (visual.getSelectionCount() === 0) {
Function unsupportedIterableToArray
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
var unsupportedIterableToArray = createCommonjsModule(function (module) {
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
- 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 createElement
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function createElement(tag, attrs, content) {
var element = document.createElement(tag);
var i;
var n;
if (attrs) {
- 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 createElement
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function createElement(tag, attrs, content) {
const element = document.createElement(tag)
let i
let n
if (attrs) {
- 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 createElement
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function createElement(tag, attrs, content) {
var element = document.createElement(tag);
var i;
var n;
if (attrs) {
- 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 unsupportedIterableToArray
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
var unsupportedIterableToArray = createCommonjsModule(function (module) {
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
- 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 _loopThrough
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function _loopThrough(
subDiv,
residues,
segmentsHeight,
tension,
- 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 createElement
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function createElement(tag, attrs, content) {
const element = document.createElement(tag)
let i
let n
if (attrs) {
- 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 parseBinaryData
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
parseBinaryData(arrayBuffer) {
const dataView = new DataView(arrayBuffer)
let offset = 0
const atomsCount = dataView.getUint32(offset, true)
offset += 4
- 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 _forEachAtomWithinDistFromGroup
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
_forEachAtomWithinDistFromGroup(forEachAtom, dist, process) {
const self = this
const r2 = dist * dist
const voxels = []
- 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"