Showing 711 of 1,553 total issues
Function test_match
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
test_match: function (match, indexed_rule) {
var token, lines, backup
if (this.options.backtrack_lexer) {
// save context
Function e
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
function e(r, i, o) {
var a = typeof r
if ('string' === a) {
var u = n(r)
if (32 > u) return i.setUint8(o, 160 | u), t(i, o + 1, r), 1 + u
Function test_match
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
test_match: function (match, indexed_rule) {
var token, lines, backup
if (this.options.backtrack_lexer) {
// save context
Function _forEachVoxelWithinRadius
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
_forEachVoxelWithinRadius(center, radius, process) {
const xRange = VoxelWorld._xRange
const yRange = VoxelWorld._yRange
const zRange = VoxelWorld._zRange
Function Picker
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Picker(gfxObj, camera, domElement) {
EventDispatcher.call(this)
const self = this
this.gfxObj = gfxObj
Function dssp
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
dssp() {
const ssMap = new SecondaryStructureMap(this)
const structures = (this.structures = [])
const helices = (this._helices = [])
Function parseBinaryData
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
parseBinaryData(arrayBuffer) {
const dataView = new DataView(arrayBuffer)
let offset = 0
const atomsCount = dataView.getUint32(offset, true)
offset += 4
Function _onKeyDown
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
_onKeyDown(event) {
if (!this._running || !this._hotKeysEnabled) {
return
}
Function screenshot
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
screenshot(width, height) {
const gfx = this._gfx
const deviceWidth = gfx.renderer.domElement.width
const deviceHeight = gfx.renderer.domElement.height
Function _fillSelectionColorCombo
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Menu.prototype._fillSelectionColorCombo = function (paletteID) {
const self = this
const frag = document.createDocumentFragment()
const palette = palettes.get(paletteID) || palettes.first
const colorList = palette.namedColorsArray
File readCIF.js
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { set } from 'lodash'
import ParsingError from './ParsingError'
// Implemented and being tested against: https://www.iucr.org/resources/cif/spec/version1.1/cifsyntax
Function anonymous
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
performAction: function anonymous(
yy,
yy_,
$avoiding_name_collisions,
YY_START
Function _fetchData
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fetchData(source, opts, job) {
return new Promise((resolve) => {
if (job.shouldCancel()) {
throw new Error('Operation cancelled')
}
Function _prepareBuffer
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
_prepareBuffer(framesStart, framesEnd) {
if (framesStart === undefined || framesStart === null) {
framesStart = 0
}
if (framesEnd === undefined || framesEnd === null) {
- 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 rep
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
rep(index, rep) {
// if index is missing then it is the current
if (!rep && (index === undefined || index instanceof Object)) {
rep = index
index = this.repCurrent()
- 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 dssp
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
dssp() {
const ssMap = new SecondaryStructureMap(this)
const structures = (this.structures = [])
const helices = (this._helices = [])
- 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 write_csv
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def write_csv():
# create subtotals
stats_total = defaultdict(int)
stats_props_total = defaultdict(set)
for filename, stats, stats_props in files:
- 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 _markHeteroAtoms
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
_markHeteroAtoms(mmtfData) {
const chainsInModel0 = mmtfData.chainsPerModel[0]
for (let i = 0; i < mmtfData.entityList.length; ++i) {
const entity = mmtfData.entityList[i]
if (entity.type !== 'polymer') {
- 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 write_csv
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def write_csv():
# create subtotals
stats_total = defaultdict(int)
stats_props_total = defaultdict(set)
for filename, stats, stats_props in files:
- 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 Instanced2CCylindersGeometry.js
has 274 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Color,
InstancedBufferAttribute,
InstancedBufferGeometry,
Matrix4,