Showing 711 of 1,553 total issues
Function calcNormalDir
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
calcNormalDir(posGetter) {
const left = this._left
const right = this._right
let first = left
let second = right
- 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 _fillCmpNoedit
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
_fillCmpNoedit() {
const comp = new Component(this)
comp._index = 0
const residues = this._residues
- 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 _compareReps
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
_compareReps(complexVisual, compareWithDefaults) {
const ans = {}
let repCount = 0
if (complexVisual) {
- 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 setOptions
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
setOptions(opts) {
if (typeof opts === 'string') {
opts = Miew.options.fromAttr(opts)
}
if (opts.reps) {
- 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 wrapNativeSuper
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var wrapNativeSuper = createCommonjsModule(function (module) {
function _wrapNativeSuper(Class) {
var _cache = typeof Map === "function" ? new Map() : undefined;
module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
if (Class === null || !isNativeFunction(Class)) return Class;
Function wrapNativeSuper
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var wrapNativeSuper = createCommonjsModule(function (module) {
function _wrapNativeSuper(Class) {
var _cache = typeof Map === "function" ? new Map() : undefined;
module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
if (Class === null || !isNativeFunction(Class)) return Class;
Function _computeSurface
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
_computeSurface(packedArrays, box, boundaries, params) {
const contactSurface = new ContactSurface(packedArrays, boundaries, params)
contactSurface.build()
const surface = {
Function processColFromPosMaterial
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
const processColFromPosMaterial = (function () {
const matValues = {
colorFromPos: true,
transparent: false,
colorFromDepth: false,
Function mousemove
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
ObjectControls.prototype.mousemove = function (event) {
if (this.enabled === false || this._state === STATE.NONE) {
return
}
Function setFrame
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
setFrame(frameIdx) {
this.frameIsReady = false
if (
frameIdx >= this._framesRange.start &&
frameIdx <= this._framesRange.end
Function _collectSpheresInfo
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
_collectSpheresInfo(mesh) {
const {
geometry: {
attributes: { position, color },
index
Function _findSuitableMolecule
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
_findSuitableMolecule(data, molSet) {
for (const key in data) {
if (key === 'xmlNode') {
continue
} else if (key === 'molecule') {
Function _compareReps
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
_compareReps(complexVisual, compareWithDefaults) {
const ans = {}
let repCount = 0
if (complexVisual) {
Function center
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
center(selector) {
// no arguments - center on current selection;
if (selector === undefined) {
this.setPivotSubset()
this._needRender = true
Function _initReprList
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._initReprList = function () {
this._fillReprList()
this._curReprIdx = this._viewer.repCurrent()
$(
`${this._menuId} .panel-menu[data-panel-type=miew-menu-panel-representation] .miew-repr-list .panel.valid:eq(${this._curReprIdx}) .panel-heading`
Function _onUpdate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
obj._onUpdate = function () {
if (
obj.isScriptingCommandAvailable !== undefined &&
obj.isScriptingCommandAvailable() &&
!obj._building
Function raycast
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
raycast(raycaster, intersects) {
const ray = TransformGroup._ray
const inverseMatrix = TransformGroup._inverseMatrix
const { children } = this
ray.copy(raycaster.ray)
Function _findNumVoxels
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
_findNumVoxels(posRadArray, params) {
const { numVoxels } = this
const minMaxValues = this._findMinMax(posRadArray)
const minCoordRad = minMaxValues.minPosRad
const maxCoordRad = minMaxValues.maxPosRad
Function _detectLeadWing
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
_detectLeadWing(dst, next, getAtomPosition) {
const leadAtom = this._findFirstAtomInList(cNucleicControlNames)
let wingStart = this._findFirstAtomInList(cNucleicWing1Names)
let wingEnd = this._findFirstAtomInList(cNucleicWing2Names)
Function _createSecondary
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _createSecondary(strArray, complex) {
const residues = complex._residues
const nRes = residues.length
const resid = new Uint8Array(nRes)