Showing 711 of 1,553 total issues
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div>
<ViewerContainer onChange={this._onViewerChange} />
<div style={{ 'padding-top': '0.5em' }}>
Function _initLoadPanel
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._initLoadPanel = function () {
const self = this
$(
`${self._menuId} [data-form-type=miew-menu-form-load-pdb] [data-tooltip="tooltip"]`
Function DebugTracer
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function DebugTracer(namespace) {
let enabled = false
this.enable = function (on) {
enabled = on
Function DebugTracer
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function DebugTracer(namespace) {
let enabled = false
this.enable = function (on) {
enabled = on
Function processTransparentMaterial
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const processTransparentMaterial = (function () {
const matValues = {
prepassTransparancy: true,
fakeOpacity: false,
transparent: false,
Function buildGeometry
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildGeometry(complex, colorer, mask, material) {
const polyComplexity = this.opts.polyComplexity
? this.opts.polyComplexity[this.settings.now.resolution]
: 0
const groupList = this.depGroups
Function addPair
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
addPair(indexA, indexB) {
const ia = indexA < indexB ? indexA : indexB
const ib = indexA > indexB ? indexA : indexB
const codeToAdd = ia + (ib << cMaxNeighbours)
Function compare
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
compare(repSettings) {
const diff = {}
const selStr = String(this.selector)
if (
Function parseNode
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseNode(xmlNode, result) {
if (xmlNode.nodeName === '#text' && xmlNode.nodeValue.trim() === '') {
return
}
Function _setOrigins
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
_setOrigins() {
const [xaxis, yaxis, zaxis] = this._getAxis()
this._setAxisIndices()
const header = this._header
Function _extractAssemblies
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
_extractAssemblies(complex, complexData) {
const { asymDict } = this
const asmGen = complexData.pdbx_struct_assembly_gen
if (!asmGen) {
return
Function _startAnimation
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
_startAnimation(fileData) {
this._stopAnimation()
const self = this
const visual = this._getComplexVisual()
if (visual === null) {
Function getOBB
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
getOBB(matrix, OBB) {
this._bBox.makeEmpty()
this._forEachVisual((visual) => {
this._bSphereForOneVisual.copy(visual.getBoundaries().boundingSphere)
Function createClass
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
var createClass = createCommonjsModule(function (module) {
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
- 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 createClass
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
var createClass = createCommonjsModule(function (module) {
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
- 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 _calcPoints
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function _calcPoints(residues, firstIdx, lastIdx, boundaries) {
const left = boundaries.start
const right = boundaries.end
function _prevIdx(idx) {
return idx > left && residues[idx - 1]._isValid ? idx - 1 : idx
- 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 updateToFrame
has a Cognitive Complexity of 10 (exceeds 5 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()
- 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 mouseup
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Picker.prototype.mouseup = function (event) {
const self = this
event.preventDefault()
event.stopPropagation()
- 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 _parseAtoms
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
_parseAtoms(atomsNum, MOL2Data) {
this._toHeaderString('ATOM', MOL2Data)
for (let i = 0; i < atomsNum; i++) {
const parsedStr = splitToFields(MOL2Data[++this._currPosIdx])
- 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 _fixDir
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
_fixDir(refPoint, currDir, posGetter) {
// count atoms to the right and to the left of the current plane
let rightCount = 0
let leftCount = 0
const tmpVec = refPoint.clone()
- 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"