Showing 100 of 16,909 total issues
Function ribbonV3
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
var ribbonV3 = function() {
var source = d3_source, target = d3_target, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
function chord(d, i) {
var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);
result = "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.p0) : curve(t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(s.p0)) + "Z";
- 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
Method sys
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def self.sys(command, options = {})
# Available output channels
channels = %i[stdout stderr]
# Make temporary files to store output from stdout and stderr.
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
export default function Grapher(Graph) {
return class extends React.Component {
constructor(props) {
super(props);
this.name = Graph.name(this.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
Method convert_deprecated_options
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def convert_deprecated_options(options)
options.each do |blast_algo, algo_config|
if algo_config.is_a?(Array)
# Very old config files may have a single array with CLI args.
# e.g. { blastn: ['-task blastn', '-evalue 1e-5'] }
- 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 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
circosJS.Core.prototype.render = function(ids, removeTracks) {
var name, ref, ref1, renderAll, svg, track, trackStore, trackType, tracks, translated;
if (typeof ids === 'undefined') {
renderAll = true;
ids = [];
Function advancedParamsJSX
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
advancedParamsJSX() {
let classNames = 'flex-grow block px-4 py-1 text-gray-900 border border-gray-300 rounded-lg bg-gray-50 text-base font-mono';
if (this.state.textValue) {
classNames += ' bg-yellow-100';
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { formState, isModalVisible } = this.state;
let content;
switch (formState) {
Function Chord
has a Cognitive Complexity of 12 (exceeds 5 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;
- 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 resultsJSX
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
resultsJSX() {
return (
<div className="grid grid-cols-1 md:grid-cols-4 gap-4" id="results">
<div className="hidden md:col-span-1 md:block">
<Sidebar
Function RunSummary
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
const RunSummary = (props) => {
const renderContent = () => {
return (
<div className="overview mr-0 mb-0">
<p className="m-0 text-sm">
Function componentDidMount
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
componentDidMount() {
/**
* Fetch data to initialise the search interface from the server. These
* include list of databases to search against, advanced options to
* apply when an algorithm is selected, and a query sequence that
Function renderAxes
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.renderAxes = function(parentElement, conf, layout, data) {
var axes, axis, x;
if (conf.axes.minor.spacingType === 'pixel') {
axes = (function() {
var l, ref, ref1, ref2, results;
Function drawLegend
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawLegend(svg, options, width, height, hits) {
var svg_legend = svg.append('g')
.attr('transform',
'translate(0,' + (height - 1.75 * options.margin) + ')');
Function hitLinks
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
hitLinks() {
var btns = [];
if (!(this.props.imported_xml || this.props.non_parse_seqids)) {
btns = btns.concat([
this.viewSequenceButton(),
Function selectHit
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
selectHit(id) {
var checkbox = $('#' + id);
var num_checked = $('.hit-links :checkbox:checked').length;
if (!checkbox || !checkbox.val()) return;
Function renderContent
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderContent = () => {
return (
<div className="overview mr-0 mb-0">
<p className="m-0 text-sm">
<strong>SequenceServer {props.seqserv_version}</strong> using{' '}
Function parsedOptions
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
parsedOptions(textValue) {
const words = textValue.split(" ");
let parsedOptions = this.defaultObjectValue();
// Iterate through the words in steps of 2, treating each pair as an option and its potential value
for (let i = 0; i < words.length; i += 2) {
- 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 smartBorders
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
circosJS.Core.prototype.smartBorders = function() {
var border, borders, currentBorder, l, layout, len, ref, store, track, trackId, trackType, width;
width = this.conf.defaultTrackWidth;
layout = {
'in': this._layout.conf.innerRadius,
- 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
Method tree
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def tree
all.each_with_object({}) do |db, data|
data[db.type] ||= []
use_parent = '#'
db.categories.each_with_index do |entry, 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 render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div className="relative">
<div
className="sequence">