Showing 732 of 12,568 total issues
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'
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"
Further reading
File interactive_key.rb
has 439 lines of code (exceeds 250 allowed). Consider refactoring. Open
class Tools::InteractiveKey
##### FILTER PARAMETERS #####
# @!observation_matrix_id
File data.rb
has 431 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'zip'
module Export::Dwca
# !!
Method bibtex_from_citproc
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def self.bibtex_from_citproc(c, b)
return nil unless c.present? && b.present?
c = JSON.parse(c)
b[:address] = ::Utilities::Strings.encode_with_utf8(c['address']) unless c['address'].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
Method get_diffs
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def get_diffs version_new, version_old
added_strings = []
added_strings_indices = []
deleted_strings = []
deleted_strings_indices = []
- 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_da_for_otus
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. 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
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 a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
export function useGraph() {
const state = reactive(initState())
const nodes = computed(() =>
Object.fromEntries(
- 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 OtusController
has 42 methods (exceeds 20 allowed). Consider refactoring. Open
class OtusController < ApplicationController
include DataControllerConfiguration::ProjectDataControllerConfiguration
before_action :set_otu, only: [
:show, :edit, :update, :destroy, :collection_objects, :navigation,
File collection_objects_controller.rb
has 401 lines of code (exceeds 250 allowed). Consider refactoring. Open
class CollectionObjectsController < ApplicationController
include DataControllerConfiguration::ProjectDataControllerConfiguration
before_action :set_collection_object, only: [
:show, :edit, :update, :destroy, :navigation, :containerize,
Method get_otu_contents
has 138 lines of code (exceeds 25 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').
Function init
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function() {
var
animationTime = 250;
function showAll() {
File useGraph.js
has 388 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { reactive, computed, toRefs } from 'vue'
import {
BiologicalAssociation,
BiologicalAssociationGraph,
Citation
File filter.rb
has 384 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Queries
# Overview
#
# This class manages params and nesting of filter queries.
Class Autocomplete
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class Query::Autocomplete < Queries::Query
include Arel::Nodes
include Queries::Concerns::Identifiers
Class Result
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class Result
# query string
attr_accessor :name
# how to match
Method using_iccn_class
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def using_iccn_class
unless identifier.nil?
lccn = identifier
# '200112345', '2010549727', '2003064850', '|a 2003064850', '88156495', '68-004897', '2001-459440'
- 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"