Showing 732 of 12,571 total issues
Function handleEvents
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
FilterHub.prototype.handleEvents = function (that) {
const elements = [...document.querySelectorAll('#task_carrousel')]
that.arrayTasks = elements.map(
(element) =>
File dwc_extensions.rb
has 371 lines of code (exceeds 250 allowed). Consider refactoring. Open
module FieldOccurrence::DwcExtensions
extend ActiveSupport::Concern
# include FieldOccurrence::DwcExtensions::TaxonworksExtensions
Function makeInitialState
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
function makeInitialState() {
return {
loadState: {
assertedDistribution: false,
biologicalAssociations: true,
Function init
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
init: function () {
let softValidations
function fillSoftValidation() {
if (!softValidations) {
- 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 add_original_combination
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def self.add_original_combination(t, csv, origin_citation, name_remarks_vocab_id, project_members)
e = t.original_combination_elements
infraspecific_element = t.original_combination_infraspecific_element(e, remove_sic: true)
- 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
Class Data
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
class Data
attr_accessor :data
attr_accessor :eml
Method sv_species_gender_agreement
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def sv_species_gender_agreement
if is_species_rank?
s = part_of_speech_name
if !s.nil? && is_available?
if %w{adjective participle}.include?(s)
- 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
Class TaxonNameClassification
has 34 methods (exceeds 20 allowed). Consider refactoring. Open
class TaxonNameClassification < ApplicationRecord
include Housekeeping
include Shared::Citations
include Shared::Notes
include Shared::IsData
Method coordinates_regex_from_verbatim_label
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.coordinates_regex_from_verbatim_label(text)
return nil if text.blank?
text = text.gsub("''", '"')
.gsub('´´', '"')
.gsub('ʹʹ', '"')
Method using_isbn_class
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def using_isbn_class
unless identifier.nil?
isbn = identifier.upcase
# 'ISBN-13: 978-0-596-52068-7'
isbn.gsub!('ISBN-10', '')
- 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_subject_and_object_ranks
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def validate_subject_and_object_ranks
tname = self.type_name
if tname =~ /TaxonNameRelationship::(Icnp|Icn|Iczn|Icvcn)/ && tname != 'TaxonNameRelationship::Iczn::Validating::UncertainPlacement'
rank_group = self.subject_taxon_name.rank_class.try(:parent)
- 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 nexml_descriptors
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def nexml_descriptors(options = {})
opt = {target: ''}.merge!(options)
xml = Builder::XmlMarkup.new(target: opt[:target])
m = opt[:observation_matrix]
# Multistate characters
- 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 generate
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def self.generate(otu, project_members, reference_csv = nil)
name_total = 0
::CSV.generate(col_sep: "\t") do |csv|
csv << %w{
ID
- 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 row_hash_initiate
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def row_hash_initiate
h = {}
rows = nil # Of either Otu or ObservationMatrixRow of type Otu !! TODO:
if observation_matrix_id.to_i == 0 && !otu_filter.blank?
- 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
Class ObservationMatricesController
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class ObservationMatricesController < ApplicationController
include DataControllerConfiguration::ProjectDataControllerConfiguration
before_action :set_observation_matrix, only: [
:show, :api_show, :edit, :update, :destroy,
Class TaxonNamesController
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class TaxonNamesController < ApplicationController
include DataControllerConfiguration::ProjectDataControllerConfiguration
before_action :set_taxon_name, only: [:show, :edit, :update, :destroy, :browse, :original_combination, :catalog, :api_show, :api_summary, :api_catalog]
after_action -> { set_pagination_headers(:taxon_names) }, only: [:index, :api_index], if: :json_request?
Class CollectingEventsController
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class CollectingEventsController < ApplicationController
include DataControllerConfiguration::ProjectDataControllerConfiguration
before_action :set_collecting_event, only: [:show, :edit, :update, :destroy, :card, :clone, :navigation]
after_action -> { set_pagination_headers(:collecting_events) }, only: [:index, :api_index], if: :json_request?
Class Filter
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class Filter < Query::Filter
include Queries::Concerns::DataAttributes
include Queries::Concerns::Notes
include Queries::Concerns::Tags
Method include_multistate_matrix
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def include_multistate_matrix(options = {})
opt = {target: '', descriptors: []}.merge!(options)
xml = Builder::XmlMarkup.new(target: opt[:target])
m = opt[:observation_matrix]
- 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_sub_headers
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def all_sub_headers(filtered = false)
unless filtered
ce_headers # generate the header structure (see CollectionObject.selected_column_names)
co_headers
bc_headers
- 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"