Showing 711 of 1,553 total issues
Function parse
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse: function parse(input) {
var self = this,
stack = [0],
tstack = [],
vstack = [null],
Function modifyExcludedFromGeo
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
modifyExcludedFromGeo(
side,
probeSphereRadius,
vBoxMin,
vBoxMax,
- 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 Miew-cli.js
has 392 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Miew } from 'miew'
import { parser as parsercli } from './MiewCLIParser'
import clihelp from './MiewCLIHelp'
import logger from './logger'
import { slice, sortBy, get, keys, isUndefined, set, assign } from 'lodash'
Function constructor
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(
radiusTop,
radiusBottom,
height,
radialSegments,
File PDBParser.js
has 381 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { isString, isUndefined } from 'lodash'
import Parser from './Parser'
import chem from '../../chem'
import Remark290 from './pdb/Remark290'
import Remark350 from './pdb/Remark350'
Function _fillReprList
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._fillReprList = function () {
const self = this
const reprList = $(
`${self._menuId} .panel-menu[data-panel-type=miew-menu-panel-representation] .miew-repr-list`
)
Function _initializeTerminal
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
Menu.prototype._initializeTerminal = function () {
const self = this
let res = null
let urlSubString = ''
const element = $(
- 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 _doGridPosNorms
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
_doGridPosNorms(isoValue, step, appendSimple) {
const vol = this._volumetricData
const volData = this._volumetricData.getData()
const dim = vol.getDimensions()
const xSize = dim[0]
Function K
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
function K(r, t, n) {
n = n || {}
var e,
i,
o,
ComplexVisual
has 37 functions (exceeds 20 allowed). Consider refactoring. Open
class ComplexVisual extends Visual {
constructor(name, dataSource) {
super(name, dataSource)
this._complex = dataSource
File VolumeMesh.js
has 368 lines of code (exceeds 250 allowed). Consider refactoring. Open
import VolumeMaterial from './shaders/VolumeMaterial'
import settings from '../settings'
import {
BufferAttribute,
BufferGeometry,
File FBXResult.js
has 366 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Forming default definitions block
const defaultDefinitions = `
Definitions: {
Version: 100
Count: 3
Function AVHash
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
function AVHash(posRad, min, max, maxDistance) {
const itemSize = 4
const nAtoms = posRad.length / itemSize
const minX = min[0]
- 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 _parseAssemblyInfo
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
_parseAssemblyInfo(mmtfData) {
let i
let j
let k
const assemblies = []
- 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 _doGridPosNorms
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
_doGridPosNorms(isoValue, step, appendSimple) {
const vol = this._volumetricData
const volData = this._volumetricData.getData()
const dim = vol.getDimensions()
const xSize = dim[0]
- 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 _selectComponents
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
_selectComponents(text) {
const parser = new DOMParser()
const doc = parser.parseFromString(text, 'application/xml')
const traversedData = this._traverseData(doc)
let rawData
Function createVoxels
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
createVoxels() {
let numAtomsRefs
let rad
const ATOM_VOXEL_REF_SCALE = 4.5
Function _updateVertices
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
_updateVertices() {
// Algorithm:
// 1. Get plane parameters
// 2. Compute culling flags for all vertices
// 3. If intersection occurs => compute from 3 to 6 intersection points
Function _buildAlphaHelices
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
_buildAlphaHelices(inResidues, chainLength, inPreferPiHelices) {
// Helix and Turn
for (let stride = 3; stride <= 5; ++stride) {
if (inResidues.length < stride) {
break
Function _presetsPanelActionsPdbInputsRefresh
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
Menu.prototype._presetsPanelActionsPdbInputsRefresh = function (self) {
const loadPdbButton = $(
`${self._menuId} .presets-panel-action[data-presets-panel-action=pdb-load]`
)
const clearInputsButton = $(
- 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"