Showing 100 of 16,909 total issues
Function processConf
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
this.processConf = function(conf, defaultConf, meta, instance, utils) {
Function asMailtoHref
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export default function asMailtoHref(querydb, program, numQueries, url, isOpenAccess) {
Function composeEmail
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function composeEmail(dbsArr, program, numQueries, url, isOpenAccess) {
Function graphIt
has a Cognitive Complexity of 7 (exceeds 5 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.
*/
- 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 componentDidUpdate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
componentDidUpdate(_prevProps, prevState) {
// If there's only one database, select it.
if (this.databases() && this.databases().length === 1 && this.state.currentlySelectedDatabases.length === 0) {
this.setState({currentlySelectedDatabases: this.databases()});
}
- 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 type
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
type() {
let sequence = this.value().trim();
// FASTQ detected, but we don't know if conversion has succeeded yet
// will notify separately if it does
if (sequence.startsWith('@') ) { return undefined; }
- 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 raise!
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def raise!
return true if exitstatus.zero? && !File.zero?(stdout)
case exitstatus
when 1..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 graphControls
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
graphControls($queryDiv, $graphDiv, isInit, opts, hits) {
var MIN_HITS_TO_SHOW = 20;
var totalHits, shownHits, lessButton, moreButton;
- 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 draw_axes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
draw_axes() {
var space, len;
len = this._scale_y.ticks().length;
if (len >= 5) {
space = 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 hspStats
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
hspStats() {
// An array to hold text or span elements that make up the line.
let line = [];
// Bit score and total score.
- 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 renderDatabases
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
renderDatabases(category) {
// Panel name and column width.
var panelTitle = category[0].toUpperCase() +
category.substring(1).toLowerCase() + ' databases';
var columnClass = this.categories().length === 1 ? 'col-span-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
Avoid too many return
statements within this function. Open
return v / conf.ticks.labelDenominator + conf.ticks.labelSuffix;
Method probably_fastas
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def probably_fastas
return @probably_fastas if defined?(@probably_fastas)
@probably_fastas = []
- 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 determineBlastMethods
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
determineBlastMethods() {
var database_type = this.databaseType;
var sequence_type = this.sequenceType;
if (this.query.current.isEmpty()) {
- 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 validate_options
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def validate_options(options)
return true if !options || (options.is_a?(String) &&
options.strip.empty?)
fail InputError, 'Invalid characters detected in options.' unless allowed_chars.match(options)
- 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 check_num_threads
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def check_num_threads
num_threads = Integer(config[:num_threads])
fail NUM_THREADS_INCORRECT unless num_threads.positive?
logger.debug "Will use #{num_threads} threads to run BLAST."
if num_threads > 256
- 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 selectHit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
selectHit(id) {
var checkbox = $('#' + id);
var num_checked = $('.hit-links :checkbox:checked').length;
if (!checkbox || !checkbox.val()) return;
- 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 update_searchdata_from_job
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def update_searchdata_from_job(searchdata)
job = fetch_job(params[:job_id])
return { error: 'Job not found' }.to_json if job.nil?
return if job.imported_xml_file
- 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 init_binaries
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def init_binaries
if config[:bin]
config[:bin] = File.expand_path config[:bin]
unless File.exist?(config[:bin]) && File.directory?(config[:bin])
fail ENOENT.new('bin dir', config[:bin])
- 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 write_entries
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def write_entries(entries, path, zipfile)
entries.each do |e|
zipfile_path = path == '' ? e : File.join(path, e)
disk_file_path = File.join(@input_dir, zipfile_path)
- 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"