Showing 925 of 12,579 total issues
File csl_styles.rb
has 2212 lines of code (exceeds 250 allowed). Consider refactoring. Open
CSL_STYLES = {
"http://www.zotero.org/styles/vancouver-brackets-only-year-no-issue" => "Vancouver (brackets, only year in date, no issue numbers)",
"http://www.zotero.org/styles/physiologia-plantarum" => "Physiologia Plantarum",
"http://www.zotero.org/styles/orthopedic-clinics-of-north-america" => "Orthopedic Clinics of North America",
"http://www.zotero.org/styles/asa-cssa-sssa" => "American Society of Agronomy, Crop Science Society of America, Soil Science Society of America",
Method useful_descriptors
has a Cognitive Complexity of 197 (exceeds 5 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'
- 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
File soft_validation_extensions.rb
has 1461 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Protonym::SoftValidationExtensions
module Klass
VALIDATIONS = {
sv_validate_name: {
File dwcTerms.js
has 997 lines of code (exceeds 250 allowed). Consider refactoring. Open
export default [
{
name: 'type',
qualName: 'http://purl.org/dc/terms/type',
description: 'The nature or genre of the resource. For Darwin Core, recommended best practice is to use the name of the class that defines the root of the record.',
Method has too many lines. [168/25] Open
def invalid_relationship_remove_sf(project_id)
fixed = 0
combinations = 0
i = 0
- 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. [168/25] 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'
- 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 dates.rb
has 797 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Utilities::Dates
EARLIEST_DATE = '1700/01/10'.freeze # Reconcile with in-app
LONG_MONTHS = %w{january february march april may june july august september october november december}.freeze
Method has too many lines. [138/25] Open
def get_otu_contents(options = {})
opt = {otus: []}.merge!(options)
m = opt[:observation_matrix]
otus = Otu.select('otus.*, observation_matrix_rows.id AS row_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.
Function useFieldSync
has 367 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function useFieldSync() {
const attributes = ref([])
const dataAttributes = ref([])
const from = ref()
const isLoading = ref(false)
Method get_otu_contents
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
def get_otu_contents(options = {})
opt = {otus: []}.merge!(options)
m = opt[:observation_matrix]
otus = Otu.select('otus.*, observation_matrix_rows.id AS row_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
Function useGraph
has 337 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function useGraph() {
const state = reactive(initState())
const nodes = computed(() =>
Object.fromEntries(
Method sv_potential_species_homonyms
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
def sv_potential_species_homonyms
if persisted? && is_species_rank? && is_available?
if TaxonNameRelationship.where_subject_is_taxon_name(self).homonym_or_suppressed.empty?
if self.id == self.lowest_rank_coordinated_taxon.id
name1 = self.cached_primary_homonym ? self.cached_primary_homonym : nil
- 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 has too many lines. [116/25] Open
def read_shape(filename, index)
# TODO: For some reason, Gis::FACTORY does not seem to be the default factory, so we are being specific here, to get the lenient polygon tests. This gets us past the problem polygons, but does not actually deal with the problem.
# See http://dazuma.github.io/rgeo-shapefile/rdoc/RGeo/Shapefile/Reader.html for reader options.
# ne10 = RGeo::Shapefile::Reader.open('G:\Share\Downloads\PostgreSQL\PostGIS\10m_cultural\10m_cultural\ne_10m_admin_0_countries.shp', factory: Gis::FACTORY)
- 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 data.rb
has 678 lines of code (exceeds 250 allowed). Consider refactoring. Open
concern :data_routes do |options|
collection do
get 'download'
get 'list'
post 'batch_create'
Method has too many lines. [108/25] Open
def self.coordinates_regex_from_verbatim_label(text)
return nil if text.blank?
text = text.gsub("''", '"')
.gsub('´´', '"')
.gsub('ʹʹ', '"')
- 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 date_regex_from_verbatim_label
has 266 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.date_regex_from_verbatim_label(text)
return nil if text.blank?
text = ' ' + text.downcase.squish + ' '
date = {}
Method remaining_taxa
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. 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
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 init
has 241 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function () {
let softValidations
function fillSoftValidation() {
if (!softValidations) {
File filter.rb
has 567 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Queries
module BiologicalAssociation
class Filter < Query::Filter
include Queries::Concerns::Notes
File tasks.rb
has 560 lines of code (exceeds 250 allowed). Consider refactoring. Open
scope :tasks do
scope :data_attributes do
scope :field_synchronize, controller: 'tasks/data_attributes/field_synchronize' do
get '/', action: :index, as: 'field_synchronize_task'