Showing 711 of 1,553 total issues
Function addVertexToGeo
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
addVertexToGeo(geoOut, vAdd) {
let entry
const oneHynberes = 0.01
const n815851 = 815851
const n37633 = 37633
Function buildNormals
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildNormals(numVertices, vertices, normals) {
const self = this
let numCloseAtoms = 0
let vx = 0
let vy = 0
Function _parseAtom
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
_parseAtom(line) {
this._residueNumber = line.readInt(1, 5)
this._residueName = line.readString(6, 10).trim()
this._atomName = line.readString(11, 15).trim()
this._atomNumber = line.readInt(16, 20)
Function getMiewWithCli
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
var getMiewWithCli = function getMiewWithCli(miewInstance) {
var obj = Object.create(miewInstance);
obj.script = function (script, _printCallback, _errorCallback) {
MiewCLIParser.parser.yy.miew = obj;
MiewCLIParser.parser.yy.echo = _printCallback;
- 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 getMiewWithCli
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
var getMiewWithCli = function getMiewWithCli(miewInstance) {
var obj = Object.create(miewInstance);
obj.script = function (script, _printCallback, _errorCallback) {
MiewCLIParser.parser.yy.miew = obj;
MiewCLIParser.parser.yy.echo = _printCallback;
- 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 getMiewWithCli
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
export const getMiewWithCli = (miewInstance) => {
const obj = Object.create(miewInstance)
obj.script = function (script, _printCallback, _errorCallback) {
parsercli.yy.miew = obj
- 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 computeBoundaries
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
computeBoundaries() {
const atoms = this._complex._atoms
const n = atoms.length
const selector = this._selector
- 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 _updateInfoPanel
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
_updateInfoPanel() {
const info = this._msgAtomInfo.getElementsByTagName('p')[0]
let atom
let residue
Function _copyCurReprListItem
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._copyCurReprListItem = function (index) {
const self = this
const reprList = $(
`${self._menuId} .panel-menu[data-panel-type=miew-menu-panel-representation] .miew-repr-list`
)
Function show
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype.show = function (panelID, menuItem) {
const self = this
this.setBlur(true)
this._titlebar.hide()
Function _initPresetsPanelActions
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._initPresetsPanelActions = function () {
const self = this
self.presetsPanel.actions.pdb.inputs.refresh =
self._presetsPanelActionsPdbInputsRefresh // check input box?
Function _parseValue
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _parseValue() {
let val
if (
(code === 46 || code === 63) &&
(i + 1 >= n || _isWhitespace(source.charCodeAt(i + 1)))
File MOL2Parser.js
has 258 lines of code (exceeds 250 allowed). Consider refactoring. Open
import Parser from './Parser'
import chem from '../../chem'
import { Vector3 } from 'three'
const { Complex, Element, Bond, Molecule } = chem
File PDBExporter.js
has 257 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { invert } from 'lodash'
import Complex from '../../chem/Complex'
import Exporter from './Exporter'
import PDBResult from './PDBResult'
import Assembly from '../../chem/Assembly'
Function next
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
next: function () {
if (this.done) {
return this.EOF
}
if (!this._input) {
Function updateToFrame
has 54 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 bondsIdc = this._selection.chunks
const { bonds } = this._selection
Function _prepareBuffer
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
_prepareBuffer(framesStart, framesEnd) {
if (framesStart === undefined || framesStart === null) {
framesStart = 0
}
if (framesEnd === undefined || framesEnd === null) {
Function _buildVW
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
_buildVW() {
const self = this
const residues = this._complex._residues
let ri
let preri
Function next
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
next: function () {
if (this.done) {
return this.EOF
}
if (!this._input) {
Function rebuild
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
rebuild() {
const self = this
// Destroy current geometry
gfxutils.clearTree(this)