Showing 67 of 149 total issues
Function render
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
render: function() {
this._createCanvas();
this.el.textContent = "overview";
this.el.style.marginTop = this.g.zoomer.get("overviewboxPaddingTop");
- 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 genConservedSequences
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
genConservedSequences: (len, seqLen, dict) => {
const seqs = [];
if (!(typeof len !== "undefined" && len !== null)) { len = BMath.getRandomInt(3,5); }
if (!(typeof seqLen !== "undefined" && seqLen !== null)) { seqLen = BMath.getRandomInt(50,200); }
- 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 render
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
this.setName("Filter");
this.addNode("Hide columns by threshold",(e) => {
let threshold = prompt("Enter threshold (in percent)", 20);
threshold = threshold / 100;
File CanvasSeqBlock.js
has 282 lines of code (exceeds 250 allowed). Consider refactoring. Open
const boneView = require("backbone-childs");
const mouse = require("mouse-pos");
import {throttle} from "lodash";
const jbone = require("jbone");
Function initialize
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
initialize: function(data) {
if (!(typeof data !== "undefined" && data !== null)) { data = {}; }
// check for default arrays
if (!(data.colorscheme != null)) { data.colorscheme = {}; }
- 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 getComparators
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
getComparators: function() {
var models = [];
models.push({text: "ID " + arrowUp, comparator: "id"});
Function showTree
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
showTree: function(newickStr) {
var newick = window.require("biojs-io-newick");
var mt = window.require("msa-tnt");
if (typeof newickStr === "string") {
Function getComparators
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
getComparators: function() {
var models = [];
models.push({text: "ID " + arrowUp, comparator: "id"});
- 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 render
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
render: function() {
dom.removeAllChilds(this.el);
this.el.style.display = "inline-block";
- 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 initialize
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
initialize: function(data) {
if (!(typeof data !== "undefined" && data !== null)) { data = {}; }
// check for default arrays
if (!(data.colorscheme != null)) { data.colorscheme = {}; }
Function _renderSelection
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderSelection: function(data) {
let xZero = data.xZero;
const yZero = data.yZero;
const n = data.n;
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
var conserv = this.g.stats.scale(this.g.stats.conservation());
dom.removeAllChilds(this.el);
Function render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
this._createCanvas();
this.el.textContent = "overview";
this.el.style.marginTop = this.g.zoomer.get("overviewboxPaddingTop");
Function showTree
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
showTree: function(newickStr) {
var newick = window.require("biojs-io-newick");
var mt = window.require("msa-tnt");
if (typeof newickStr === "string") {
- 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 render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
dom.removeAllChilds(this.el);
this.el.style.display = "inline-block";
Function render
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
dom.removeAllChilds(this.el);
this.el.style.width = `${this.g.zoomer.getLabelWidth()}px`;
//@el.style.height = "#{@g.zoomer.get "rowHeight"}px"
Function initialize
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
initialize: function(data) {
this.g = data.g;
this.listenTo(this.g.zoomer, "change:_alignmentScrollLeft change:_alignmentScrollTop", function(model,value, options) {
if ((!(((typeof options !== "undefined" && options !== null) ? options.origin : undefined) != null)) || options.origin !== "canvasseq") {
Function _buildM
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
_buildM: function(data) {
let displayedButton, frag, key, li, node, style, _ref;
let nodes = data.nodes;
let name = data.name;
let menu = document.createElement("div");
Function render
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
render: function() {
var conserv = this.g.stats.scale(this.g.stats.conservation());
dom.removeAllChilds(this.el);
- 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 colorer
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
colorer: function(colorRange) {
let colorer = function() { return "none" };
if( typeof colorRange === 'string' ) {
colorer = function() { return colorRange };
- 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"