Showing 711 of 1,553 total issues
Function projectTorus
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function projectTorus(a, b) {
const aIdx = itemSize * a
const bIdx = itemSize * b
const xa = posRad[aIdx]
const ya = posRad[aIdx + 1]
Function exportCML
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
exportCML() {
const self = this
function extractRotation(m) {
const xAxis = new Vector3()
File IsosurfaceBuildNormals.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
import utils from '../../utils'
import { Vector3 } from 'three'
// suppress some JSHint warnings
/* jshint bitwise: false */
Function modifyExcludedFromGeo
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
modifyExcludedFromGeo(
side,
probeSphereRadius,
vBoxMin,
vBoxMax,
Function constructor
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(type, dimensions, box, vecSize, data, volumeInfo) {
this._box = box.clone()
this._dimVec = Math.max(Math.floor(vecSize || 1), 1)
this._volumeInfo = volumeInfo
Function joinComplexes
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
joinComplexes(complexes) {
// clear target complex
this._chains = []
this._components = []
this._helices = []
Function iterableToArrayLimit
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
var iterableToArrayLimit = createCommonjsModule(function (module) {
function _iterableToArrayLimit(arr, i) {
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
if (_i == null) return;
var _arr = [];
- 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 iterableToArrayLimit
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
var iterableToArrayLimit = createCommonjsModule(function (module) {
function _iterableToArrayLimit(arr, i) {
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
if (_i == null) return;
var _arr = [];
- 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 _updateIndices
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
_updateIndices() {
// Algorithm:
// 1. Get plane vertices (from 3 to 6 vertices)
// 2. Get "right" vector in plane
// 3. Sort vertices using Graham-like method
- 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 _traverseData
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
_traverseData(dom) {
function isArray(o) {
return Object.prototype.toString.apply(o) === '[object Array]'
}
- 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 _fromArray
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function _fromArray(entries) {
repIndex = 0
const opts = {}
for (let i = 0, n = entries.length; i < n; ++i) {
const /** string[] */ entry = entries[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
File Palette.js
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { assign } from 'lodash'
function clamp(x, a, b) {
return x <= b ? (x < 0 ? 0 : x) : b
}
Function _updateIndices
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
_updateIndices() {
// Algorithm:
// 1. Get plane vertices (from 3 to 6 vertices)
// 2. Get "right" vector in plane
// 3. Sort vertices using Graham-like method
Function getMiewWithCli
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
var getMiewWithCli = function getMiewWithCli(miewInstance) {
var obj = Object.create(miewInstance);
obj.script = function (script, _printCallback, _errorCallback) {
MiewCLIParser.parser.yy.miew = obj;
MiewCLIParser.parser.yy.echo = _printCallback;
Function test_match
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
test_match: function test_match(match, indexed_rule) {
var token, lines, backup;
if (this.options.backtrack_lexer) {
backup = {
yylineno: this.yylineno,
Function getMiewWithCli
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
var getMiewWithCli = function getMiewWithCli(miewInstance) {
var obj = Object.create(miewInstance);
obj.script = function (script, _printCallback, _errorCallback) {
MiewCLIParser.parser.yy.miew = obj;
MiewCLIParser.parser.yy.echo = _printCallback;
Function test_match
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
test_match: function test_match(match, indexed_rule) {
var token, lines, backup;
if (this.options.backtrack_lexer) {
backup = {
yylineno: this.yylineno,
Function Menu
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Menu(/** Node */ container, /** Miew */ viewer) {
// Add proper DOM elements
_.forEach($.parseHTML(menuHtml), (element) =>
container.parentNode.appendChild(element)
)
Function _parseAssemblyInfo
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
_parseAssemblyInfo(mmtfData) {
let i
let j
let k
const assemblies = []
Function _renderFrame
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderFrame(stereo) {
const gfx = this._gfx
const { renderer } = gfx
renderer.getSize(this._size)