Showing 711 of 1,553 total issues
Function updateToFrame
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateToFrame(frameData) {
// This method looks like a copy paste. However, it
// was decided to postpone animation refactoring until GFX is fixed.
const residues = frameData.getResidues()
Function _parseAtomsInf
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
_parseAtomsInf() {
const het = true
const altLoc = ' '
const occupancy = 1
const tempFactor = 1
Function updateCMLData
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateCMLData(complex) {
const { root } = self._gfx
const mat = extractRotation(root.matrixWorld)
const v4 = new Vector4(0, 0, 0, 0)
const vCenter = new Vector4(0, 0, 0, 0)
Function _addReprListItem
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Menu.prototype._addReprListItem = function (panel, index, repr) {
const self = this
const reprList = $(
`${self._menuId} [data-panel-type=miew-menu-panel-representation] .miew-repr-list`
)
- 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 pickObject
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Picker.prototype.pickObject = function (screenPos) {
if (!this.gfxObj) {
this.picked = {}
this.dispatchEvent({ type: 'newpick', obj: {} })
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 rebuildSelectionGeometry
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
rebuildSelectionGeometry() {
const mask = 1 << this._selectionBit
gfxutils.clearTree(this._selectionGeometry)
- 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 parse
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
parse(stream) {
/** @type {?Assembly} */
let assembly = this._assembly
/** @type {?Matrix4} */
let matrix = this._matrix
- 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 extractArgs
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function extractArgs(input, defaultsDict, params) {
if (input) {
const bang = input.indexOf(cOptsSep)
const inputVal = parseParams(
input.substr(0, bang >= 0 ? bang : 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 toScript
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function toScript(opts) {
const commandsList = []
let idx = 0
function checkAndAdd(command, value, saveQuotes) {
if (value !== null && value !== 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 _resetComponentTransform
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
_resetComponentTransform() {
const visual = this._complexVisual
const selection = this._complexVisual.getSelectionGeo()
let i
let j
- 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 _onPick
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
_onPick(event) {
if (!settings.now.picking) {
// picking is disabled
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 _build
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
_build() {
const { residues, parent } = this._selection
const mode = this._mode
const colorer = this._colorer
const geo = this._geo
Function toScript
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function toScript(opts) {
const commandsList = []
let idx = 0
function checkAndAdd(command, value, saveQuotes) {
if (value !== null && value !== undefined) {
Function fillSingleWords
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fillSingleWords() {
const frag = document.createDocumentFragment()
let newItem
const group = selectionPanel.find('[data-tab-content=singleword]').get(0)
let i
Function _loopThrough
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _loopThrough(
subDiv,
residues,
segmentsHeight,
tension,
Function _initVertices
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
_initVertices(segmentsCount) {
this._buffersSize = segmentsCount * VERTEX_PER_SEGMENT
const pointsCount = this._buffersSize
const use32bitIndex = pointsCount > MAX_IDC_16BIT
this._index = utils.allocateTyped(
Function constructor
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(volume, width, height) {
const planeGeo = this._initPlaneGeo(width, height)
const mat = new VolumeMaterial.BackFacePosMaterialFarPlane()
this._plane = new meshes.Mesh(planeGeo, mat)
Function _fillCmpEdit
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
_fillCmpEdit() {
const self = this
const components = this._components
function addComp() {
Function resetReps
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
resetReps(reps) {
// Create all necessary representations
if (this._complex) {
this._complex.clearAtomBits(~0)
}
Function _traverseData
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
_traverseData(dom) {
function isArray(o) {
return Object.prototype.toString.apply(o) === '[object Array]'
}