Showing 119 of 7,605 total issues
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 overviewJSX
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
overviewJSX() {
return (
<div className="overview">
<p>
<strong>SequenceServer {this.state.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"
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() {
const { formState } = this.state;
let content;
switch (formState) {
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div className="relative">
<div
className="sequence">
Function warningJSX
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
warningJSX() {
return(
<div className="container">
<div className="row">
<div className="col-md-6 col-md-offset-3 text-center">
Function renderChords
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.renderChords = function(parentElement, name, conf, data, layout, ratio, getSource, getTarget) {
var link, track;
track = parentElement.append('g').attr('class', conf.colorPalette);
link = track.selectAll('.chord').data(data).enter().append('path').attr('class', 'chord').attr('d', d3.svg.chord().source(function(d) {
return getSource(d, layout);
Function renderBlock
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.renderBlock = function(parentElement, data, layout, conf) {
var block, scope;
scope = conf.outerRadius - conf.innerRadius;
block = parentElement.selectAll('.block').data(data).enter().append('g').attr('class', 'block').attr('transform', function(d) {
return 'rotate(' + layout.blocks[d.key].start * 360 / (2 * Math.PI) + ')';
Function applyRules
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.applyRules = function(rules, data) {
var datum, i, k, results, rule, v;
rules = rules || [];
results = [];
for (k in data) {
Function componentDidMount
has 29 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
Method defaults
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def defaults
@defaults ||= {
host: '0.0.0.0',
port: 4567,
databases_widget: 'classic',
Function renderDatum
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.renderDatum = function(parentElement, conf, layout, utils) {
var tile;
tile = parentElement.selectAll('.tile').data(function(d) {
return d.values;
}).enter().append('path').attr('class', 'tile').attr('d', d3.svg.arc().innerRadius(utils.datumInnerRadius).outerRadius(utils.datumOuterRadius).startAngle(function(d) {
Function Text
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
circosJS.Text = function() {
circosJS.Track.call(this);
this.parseData = circosJS.parsePositionTextData;
this.renderDatumContainer = (function(_this) {
return function(instance, parentElement, name, data, conf) {
Function determineBlastMethods
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
determineBlastMethods() {
var database_type = this.databaseType;
var sequence_type = this.sequenceType;
if (this.refs.query.isEmpty()) {
Method normalize
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def normalize(data)
return {} unless data
# Symbolize keys.
data = data.transform_keys(&:to_sym)
- 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 ratioCalculate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
ratioCalculate(value, min, max, scope, reverse, logScale) {
var fraction, scaleLogBase, x;
scaleLogBase = logScale ? 2.3 : 1;
if (
min === max ||
- 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 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var classNames = 'flex-grow block px-4 py-1 text-gray-900 border border-gray-300 rounded-lg bg-gray-50 text-base';
if (this.state.value.trim()) {
classNames += ' bg-yellow-100';
}
Function constructor
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(props) {
super(props);
// Properties below are internal state used to render results in small
// slices (see updateState).
this.numUpdates = 0;
Function selectHit
has 26 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()) {