Showing 102 of 16,957 total issues
Function Track
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
circosJS.Track = function() {
this.build = function(instance, conf, data) {
this.dispatch = d3.dispatch('mouseover', 'mouseout');
this.loadData(data, instance);
this.conf = this.processConf(conf, this.defaultConf, this.meta, instance, this);
- 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 HSP
has 220 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function HSP(props) {
const hsp = props.hsp;
const hspRef = createRef();
const printing = useDetectPrint();
const [chars, setChars] = useState(0)
Function Track
has 215 lines of code (exceeds 25 allowed). Consider refactoring. Open
circosJS.Track = function() {
this.build = function(instance, conf, data) {
this.dispatch = d3.dispatch('mouseover', 'mouseout');
this.loadData(data, instance);
this.conf = this.processConf(conf, this.defaultConf, this.meta, instance, this);
Function HSP
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
export default function HSP(props) {
const hsp = props.hsp;
const hspRef = createRef();
const printing = useDetectPrint();
const [chars, setChars] = useState(0)
- 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 graphIt
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
graphIt($queryDiv, $graphDiv, index, howMany, opts, inhits) {
/* barHeight: Height of each hit track.
* legend: Height reserved for the overview legend.
* margin: Margin around the svg element.
*/
Function Chord
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
circosJS.Chord = function() {
circosJS.Track.call(this);
this.parseData = circosJS.parseChordData;
this.applyRules = function(rules, data) {
var datum, l, len, results, rule;
Function downloadsPanelJSX
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
downloadsPanelJSX() {
return (
<div className="downloads">
<div className="pl-px table mb-0 w-full">
<h4 className="text-sm font-bold mb-0 mt-2.5">
Function setupTooltip
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
setupTooltip() {
var selected = {};
$('.circos-distribution').on(
'click',
_.bind(function (event) {
Function Grapher
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function Grapher(Graph) {
return function Component(props) {
const alwaysShowName = Graph.alwaysShowName === undefined ? false : Graph.alwaysShowName();
const printing = useDetectPrint();
const name = Graph.name(props);
Function Component
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function Component(props) {
const alwaysShowName = Graph.alwaysShowName === undefined ? false : Graph.alwaysShowName();
const printing = useDetectPrint();
const name = Graph.name(props);
const [width, setWidth] = useState(window.innerWidth);
Function get_styles
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
var get_styles = function () {
var styles = '';
for (var i = 0; i < document.styleSheets.length; i++) {
(function process_ss(ss) {
- 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 Grapher
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
export default function Grapher(Graph) {
return function Component(props) {
const alwaysShowName = Graph.alwaysShowName === undefined ? false : Graph.alwaysShowName();
const printing = useDetectPrint();
const name = Graph.name(props);
- 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 sharingPanelJSX
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
sharingPanelJSX() {
return (
<div className="sharing-panel">
<div className="pl-px table mb-0 w-full">
<h4 className="text-sm font-bold mb-0 mt-2.5">
Function graphControls
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
graphControls($queryDiv, $graphDiv, isInit, opts, hits) {
var MIN_HITS_TO_SHOW = 20;
var totalHits, shownHits, lessButton, moreButton;
Function renderLayoutTicks
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
circosJS.renderLayoutTicks = function(conf, layout, d3, instance) {
var blockTicks, displayLabel, ticks;
blockTicks = function(d) {
var k,space;
k = (d.end - d.start) / d.len;
Function componentDidMount
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
componentDidMount() {
var self = this;
var FASTA_FORMAT = /^>/;
$(document).ready(function () {
Function removeTracks
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
circosJS.Core.prototype.removeTracks = function(trackIds) {
var id, l, len, ref, store, svg, trackId, type;
svg = d3.select(this.conf.container);
ref = this.tracks;
for (type in ref) {
- 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 drawLegend
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawLegend() {
this.ratioHSP = [];
_.each(
this.chords_arr,
_.bind(function (obj) {
Function pollPeriodically
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
pollPeriodically(path, callback, errCallback) {
var intervals = [200, 400, 800, 1200, 2000, 3000, 5000];
function poll() {
fetch(path)
.then(response => {
Function Layout
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
circosJS.Layout = function(conf, data) {
var block_nb, gap, k, offset, ref, ref1, size, v;
if (data == null) {
circosJS.log(2, 'no layout data', '');
}