Showing 102 of 16,957 total issues
Function calculate_multipliers
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
calculate_multipliers() {
var sum_query_length = 0;
var sum_hit_length = 0;
_.each(
this.query_arr,
Method defaults
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
def defaults
@defaults ||= {
host: '0.0.0.0',
port: 4567,
databases_widget: 'classic',
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div
className="dnd-overlay absolute left-0 top-0 w-full h-full bg-gray-200 bg-opacity-75 z-40"
style={{ display: 'none' }}>
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div>
<div id="overlay" style={{ position: 'absolute', top: 0, left: 0, width: '100vw', height: '100vw', background: 'rgba(0, 0, 0, 0.2)', display: 'none', zIndex: 99 }} />
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 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
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 render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { formState, isModalVisible } = this.state;
let content;
switch (formState) {
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 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 print:grid-cols-1" id="results">
<div className="hidden md:col-span-1 md:block print:hidden">
<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 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"