Showing 711 of 1,553 total issues
Function _parseSet
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
_parseSet(varData) {
const complex = (this._complex = new Complex())
const data = varData
const currentLabel = data.curr
const { atoms, labels } = data
- 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
Complex
has 65 functions (exceeds 20 allowed). Consider refactoring. Open
class Complex {
constructor() {
this._chains = []
this._components = []
this._helices = []
File IsoSurface.js
has 550 lines of code (exceeds 250 allowed). Consider refactoring. Open
import IsoSurfaceMarchCube from './IsoSurfaceMarchCube'
import utils from '../../utils'
import { BufferAttribute, BufferGeometry, Matrix3, Vector3 } from 'three'
const edgeTable = [
Function _updateVertices
has a Cognitive Complexity of 54 (exceeds 5 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
- 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 _buildBetaSheets
has 209 lines of code (exceeds 25 allowed). Consider refactoring. Open
_buildBetaSheets() {
// find bridges
// check each chain against each other chain, and against itself
const bridges = []
for (let a = 0; a < this._complex._chains.length; ++a) {
Function _init
has 207 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._init = function () {
const self = this
let selectorHide = null
let selectorShow = null
let newPanelId = null
Function _initSelectionPanel
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._initSelectionPanel = function () {
const self = this
const selectionPanel = $(
`${self._menuId} [data-panel-type=miew-menu-panel-selection]`
)
File selectors.test.js
has 471 lines of code (exceeds 250 allowed). Consider refactoring. Open
import chai, { expect } from 'chai'
import dirtyChai from 'dirty-chai'
import proxyquire from 'proxyquire'
import selectors from './selectors'
import ResidueType from './ResidueType'
Function parse
has 182 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse: function parse(input) {
var self = this,
stack = [0],
tstack = [],
vstack = [null],
Function parse
has 182 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse: function parse(input) {
var self = this,
stack = [0],
tstack = [],
vstack = [null],
File SecondaryStructureMap.js
has 462 lines of code (exceeds 250 allowed). Consider refactoring. Open
import HBondInfo from './HBondInfo'
import ResidueType from './ResidueType'
const BridgeType = Object.freeze({
NO_BRIDGE: 0,
Function _selectComponents
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
_selectComponents(text) {
const parser = new DOMParser()
const doc = parser.parseFromString(text, 'application/xml')
const traversedData = this._traverseData(doc)
let rawData
- 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 CLIUtils
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
var CLIUtils = function () {
function CLIUtils() {
_classCallCheck(this, CLIUtils);
}
_createClass(CLIUtils, [{
Function CLIUtils
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
var CLIUtils = function () {
function CLIUtils() {
_classCallCheck(this, CLIUtils);
}
_createClass(CLIUtils, [{
File utils.js
has 447 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logger from './logger'
import {
assign,
isPlainObject,
forIn,
File utils.js
has 447 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logger from './utils/logger'
import {
assign,
isPlainObject,
forIn,
Function anonymous
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
switch ($avoiding_name_collisions) {
case 0
:
break;
Function anonymous
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
switch ($avoiding_name_collisions) {
case 0
:
break;
Function _parseSet
has 165 lines of code (exceeds 25 allowed). Consider refactoring. Open
_parseSet(varData) {
const complex = (this._complex = new Complex())
const data = varData
const currentLabel = data.curr
const { atoms, labels } = data
File options.test.js
has 441 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { isArray, isEqual } from 'lodash'
import chai, { expect } from 'chai'
import dirtyChai from 'dirty-chai'
import options from './options'