Showing 925 of 12,579 total issues
Class Filter
has 64 methods (exceeds 20 allowed). Consider refactoring. Open
class Filter < Query::Filter
include Queries::Concerns::Notes
include Queries::Concerns::Tags
include Queries::Concerns::Citations
include Queries::Concerns::Depictions
Method has too many lines. [90/25] 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
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
File geo.rb
has 533 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Utilities
# Special general routines for Geo-specific itams
module Geo
# !!
Class TaxonNameRelationship
has 60 methods (exceeds 20 allowed). Consider refactoring. Open
class TaxonNameRelationship < ApplicationRecord
include Housekeeping
include Shared::Citations
include Shared::Notes
include Shared::IsData
Method has too many lines. [85/25] Open
def model_graph(model, label: false)
m = model
k = node_klass(m.name)
g = GraphViz.new(
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
File taxon_name_relationship.rb
has 504 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_dependency Rails.root.to_s + '/app/models/taxon_name_classification.rb'
# A NOMEN https://github.com/SpeciesFileGroup/nomen relationship between two Protonyms.
#
# Unless otherwise noted relationships read left to right, and can be interpreted by inserting "of" after the class name.
File data.rb
has 473 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'zip'
module Export::Dwca
# !!
Method has too many lines. [73/25] Open
def set_cached_names_for_taxon_names
begin
TaxonName.transaction_with_retry do
t = taxon_name
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Function useFieldSync
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
export function useFieldSync() {
const attributes = ref([])
const dataAttributes = ref([])
const from = ref()
const isLoading = ref(false)
- 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 extract_dates
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.extract_dates(trial, match_data)
end_date_year, end_date_month, end_date_day = 0, 0, 0
case trial[:method].downcase.to_sym
when :month_dd_yyyy_2
start_date_year = 3
Method has too many lines. [72/25] 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
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method has too many lines. [72/25] Open
def build_da_for_otus
@total_data_lines = 0
i = 0
import_klass = type_select.start_with?('im')
att_klass = (type_select.capitalize + 'Attribute').safe_constantize
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method nexml_otus
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
def nexml_otus(options = {})
opt = {target: ''}.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 coordinates_regex_from_verbatim_label
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
def self.coordinates_regex_from_verbatim_label(text)
return nil if text.blank?
text = text.gsub("''", '"')
.gsub('´´', '"')
.gsub('ʹʹ', '"')
- 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 useful_descriptors
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
def useful_descriptors
list_of_remaining_taxa = {}
language = language_id.blank? ? nil : language_id.to_i
row_hash.each do |r_key, r_value|
if r_value[:status] != 'eliminated'
Method has too many lines. [68/25] Open
def nexml_otus(options = {})
opt = {target: ''}.merge!(options)
xml = Builder::XmlMarkup.new(target: opt[:target])
m = opt[:observation_matrix]
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method has too many lines. [68/25] Open
def remaining_taxa
h = {}
language = language_id.blank? ? nil : language_id.to_i
row_hash.each do |r_key, r_value|
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
File dwc_extensions.rb
has 445 lines of code (exceeds 250 allowed). Consider refactoring. Open
module CollectionObject::DwcExtensions
extend ActiveSupport::Concern
include CollectionObject::DwcExtensions::TaxonworksExtensions
Class CollectionObjectsController
has 48 methods (exceeds 20 allowed). Consider refactoring. Open
class CollectionObjectsController < ApplicationController
include DataControllerConfiguration::ProjectDataControllerConfiguration
before_action :set_collection_object, only: [
:show, :edit, :update, :destroy, :navigation, :containerize,
Method date_regex_from_verbatim_label
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
def self.date_regex_from_verbatim_label(text)
return nil if text.blank?
text = ' ' + text.downcase.squish + ' '
date = {}
- 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"