Showing 711 of 1,553 total issues
Function _extractAssemblies
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
_extractAssemblies(complex, complexData) {
const { asymDict } = this
const asmGen = complexData.pdbx_struct_assembly_gen
if (!asmGen) {
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 performAction
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
, $$
, _$
Function performAction
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
, $$
, _$
Function performAction
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
yytext,
yyleng,
yylineno,
yy,
yystate /* action[1] */,
Function performAction
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
yytext,
yyleng,
yylineno,
yy,
yystate /* action[1] */,
Function compareOptionsWithDefaults
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function compareOptionsWithDefaults(opts, defOpts) {
var optsStr = [];
if (defOpts && opts) {
var keys = Object.keys(opts);
for (var p = 0; p < keys.length; ++p) {
- 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 compareOptionsWithDefaults
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function compareOptionsWithDefaults(opts, defOpts) {
const optsStr = []
if (defOpts && opts) {
const keys = Object.keys(opts)
for (let p = 0; p < keys.length; ++p) {
- 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 remove
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
remove(index) {
if (index && Object.hasOwn(this.representationID, index)) {
delete this.representationMap[this.representationID[index]]
delete this.representationID[index]
}
- 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 _updateInfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Menu.prototype._updateInfo = function (dataSource) {
if (dataSource && dataSource.id !== 'Complex') {
return
}
const complex = dataSource
- 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 isNativeReflectConstruct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
var isNativeReflectConstruct = createCommonjsModule(function (module) {
function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
- 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 compareOptionsWithDefaults
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function compareOptionsWithDefaults(opts, defOpts) {
var optsStr = [];
if (defOpts && opts) {
var keys = Object.keys(opts);
for (var p = 0; p < keys.length; ++p) {
- 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 _fixKeyboard
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Menu.prototype._fixKeyboard = function () {
// do IFRAME related hack
if (window !== window.top) {
const parentDocument = window.top.document
let button = parentDocument.querySelector('button')
- 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 isNativeReflectConstruct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
var isNativeReflectConstruct = createCommonjsModule(function (module) {
function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
- 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 setFrame
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
setFrame(frameIdx) {
this.frameIsReady = false
if (
frameIdx >= this._framesRange.start &&
frameIdx <= this._framesRange.end
- 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 _prepareCylinderInfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function _prepareCylinderInfo(chunkIndices) {
chunkIndices.sort(sortNumber)
const chunksIdx = []
const cylinderInfo = []
for (let i = 0, n = chunkIndices.length; i < n; ++i) {
- 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 getAtomColor
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
getAtomColor(atom, _complex) {
const { opts } = this
let factor = 1
if (atom.temperature && opts) {
if (opts.min === opts.max) {
- 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
Avoid deeply nested control flow statements. Open
if (cube.pointsValuesLinear[cubeValuesIndex + i] < 0.0) {
bitsInside |= 1 << i
}
Avoid deeply nested control flow statements. Open
if (val < corners[ind]) {
corners[ind] = val
}
Function _build
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
_build() {
const bondsIdc = this._selection.chunks
const { bonds, parent } = this._selection
const mode = this._mode
const colorer = this._colorer
- 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
Avoid deeply nested control flow statements. Open
if (dist2 < probeSpRad2) {
distToSphere = Math.sqrt(dist2)
distToBorder = -(distToSphere - probeSphereRadius)
innerBlockWorkAround()
} // if (dist from corner point to sphere center more 2 radiuses)