Showing 12,628 of 12,628 total issues
Method history_in_taxon_name
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def history_in_taxon_name(t, c, i)
if c
a = history_author_year_tag(t)
b = source_author_year_tag(c.source)
- 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 all_texts
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def all_texts
leads = Lead
.select(:id, :text, :origin_label)
.with_project_id(sessions_current_project_id)
.order(:text)
- 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 preview_bibtex_batch_load
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def preview_bibtex_batch_load
file = params.require(:file)
redirect_to batch_load_sources_path, notice: 'No file has been selected.' and return if file.blank?
file_ok, mimetype = Utilities::Files.recognized_batch_file_type?(file.tempfile)
if !file_ok
- 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 local_identifiers_facet
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def local_identifiers_facet
return nil if local_identifiers.nil?
a = nil
if local_identifiers
- 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 classification_types
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def classification_types
return [] if taxon_name_classification_set.empty?
t = []
taxon_name_classification_set.each do |i|
- 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 create_simple_batch_load
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_simple_batch_load
if params[:file] && digested_cookie_exists?(params[:file].tempfile, :Simple_namespaces_md5)
@result = BatchLoad::Import::Namespaces::SimpleInterpreter.new(**batch_params)
if @result.create
flash[:notice] = "Successfully proccessed file, #{@result.total_records_created} namespaces were created."
- 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 index
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def index
respond_to do |format|
format.html {
redirect_to hub_path, notice: 'You requested a papertrail for nothing.' and return if params[:object_type].blank?
klass = whitelist_constantize(params.require(:object_type))
- 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 create_bibtex_batch_load
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_bibtex_batch_load
file = params.require(:file)
redirect_to batch_load_sources_path, notice: 'no file has been selected' and return if file.blank?
sha256 = Digest::SHA256.file(file.tempfile)
if cookies[:batch_sources_md5] == sha256.hexdigest
- 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 autocomplete
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def autocomplete
queries = [
autocomplete_exact_id,
autocomplete_identifier_identifier_exact,
autocomplete_identifier_cached_like,
- 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 global_identifiers_facet
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def global_identifiers_facet
return nil if global_identifiers.nil?
a = nil
if global_identifiers
- 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 create_primers_batch_load
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_primers_batch_load
if params[:file] && digested_cookie_exists?(params[:file].tempfile, :Primers_sequences_md5)
@result = BatchLoad::Import::SequenceRelationships::PrimersInterpreter.new(**batch_params)
if @result.create!
flash[:notice] = "Successfully proccessed file, #{@result.total_records_created} " \
- 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 global_identifiers_facet
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def global_identifiers_facet
return nil if global_identifiers.nil?
a = nil
if global_identifiers
- 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 meta
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def meta
return @meta if @meta
@meta = Tempfile.new('meta.xml')
- 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 term_facet
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def term_facet
return nil if term.blank?
w = '%' + term.gsub(/\s+/, '%') + '%'
if term_exact
- 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 duplicate_with_locks
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def duplicate_with_locks
n = QuickVerbatimResponse.new(form_params)
# nullify if not locked
#
n.repository = nil if !locked?('repository')
- 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 result_message
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def result_message
case fixed
when :fix_not_triggered
'fix available, but not triggered'
when :no_fix_available
- 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 build_sequences
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def build_sequences
@total_data_lines = 0;
sequences = {}
sequence_values = {}
- 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 is_unambiguous?
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def is_unambiguous?
RANKS.each do |r|
if !send(r).nil?
return false unless !send(r).nil? && !unambiguous_at?(r).nil?
end
- 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 probable_source_of_text
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def probable_source_of_text
case score
when 3..23
if client.language == 'eng'
'original text'
- 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 disambiguate_combination
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def disambiguate_combination(target_protonym_ids = {})
return nil unless target_protonym_ids.any?
c = combination
b = ambiguous_ranks
- 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"