Showing 711 of 1,553 total issues
Function setValues
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
setValues(values) {
if (typeof values === 'undefined') {
return
}
- 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 mousedown
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
ObjectControls.prototype.mousedown = function (event) {
if (this.enabled === false || this._state !== STATE.NONE) {
return
}
- 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 _findSuitableMolecule
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
_findSuitableMolecule(data, molSet) {
for (const key in data) {
if (key === 'xmlNode') {
continue
} else if (key === 'molecule') {
- 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 _renderScene
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
_renderScene(camera, distortion, target) {
distortion = distortion || false
target = target || null
const gfx = this._gfx
- 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 _presetsPanelActionsPdbInputsRefresh
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._presetsPanelActionsPdbInputsRefresh = function (self) {
const loadPdbButton = $(
`${self._menuId} .presets-panel-action[data-presets-panel-action=pdb-load]`
)
const clearInputsButton = $(
Function _renderScene
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderScene(camera, distortion, target) {
distortion = distortion || false
target = target || null
const gfx = this._gfx
File FrameInfo.js
has 332 lines of code (exceeds 250 allowed). Consider refactoring. Open
import SecondaryStructureColorer from './colorers/SecondaryStructureColorer'
import { Vector3 } from 'three'
const cDataOffset = 12
const cFirstMask = 0x0fffff00
Function _initToolbar
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._initToolbar = function () {
const self = this
const frag = document.createDocumentFragment()
let newItem
Function init
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
init() {
const container = this._container
const elem = utils.createElement('div', { class: 'miew-canvas' })
_setContainerContents(container, elem)
this._container = elem
File UberMaterial.js
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable no-magic-numbers */
/* eslint-disable guard-for-in */
import vertexShader from './Uber.vert'
import fragmentShader from './Uber.frag'
File SDFParser.js
has 323 lines of code (exceeds 250 allowed). Consider refactoring. Open
import Parser from './Parser'
import chem from '../../chem'
import SDFStream from './SDFStream'
import Assembly from '../../chem/Assembly'
import { Matrix4, Vector3 } from 'three'
Function _init
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
Menu.prototype._init = function () {
const self = this
let selectorHide = null
let selectorShow = null
let newPanelId = null
- 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 _initToolsPanel
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._initToolsPanel = function () {
const self = this
$(
`${self._menuId} .miew-menu-modals [data-modal-type=miew-menu-modal-url]`
).on('shown.bs.modal', () => {
Function _initializeTerminal
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._initializeTerminal = function () {
const self = this
let res = null
let urlSubString = ''
const element = $(
Function _initReprPanel
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._initReprPanel = function () {
const self = this
const reprList = $(
`${self._menuId} .panel-menu[data-panel-type=miew-menu-panel-representation] .miew-repr-list`
)
Function AVHash
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
function AVHash(posRad, min, max, maxDistance) {
const itemSize = 4
const nAtoms = posRad.length / itemSize
const minX = min[0]
Function _extractSGroups
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
_extractSGroups(molecule, atoms) {
const moleculeArr = this._extractSGroup(molecule)
const count = atoms.length
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 _onLoad
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
_onLoad(dataSource, opts) {
const gfx = this._gfx
let visualName = null
if (opts.animation) {
- 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 ComplexVisualEdit.js
has 314 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logger from './utils/logger'
import gfxutils from './gfx/gfxutils'
import './gfx/modes'
import { Group, Matrix4, Object3D, Vector3 } from 'three'
Function updateSelectionMask
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateSelectionMask(pickedObj) {
const self = this
const { atom } = pickedObj
let { residue, chain, molecule } = pickedObj
const setMask = 1 << this._selectionBit