Showing 925 of 12,579 total issues
File interactive_key.rb
has 439 lines of code (exceeds 250 allowed). Consider refactoring. Open
class Tools::InteractiveKey
##### FILTER PARAMETERS #####
# @!observation_matrix_id
Method has too many lines. [65/25] 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
- 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 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 has too many lines. [64/25] Open
def build_sequences
@total_data_lines = 0;
sequences = {}
sequence_values = {}
- 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. [64/25] Open
def self.generate(otus, project_members, root_otu_id = nil, reference_csv = nil, prefer_unlabelled_otus: true)
# Until we have RC5 articulations we are simplifying handling the fact
# that one taxon name can be used for many OTUs. Track to see that
# an OTU with a given taxon name does not already exist
- 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 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,
Method has too many lines. [59/25] 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
- 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. [59/25] 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
- 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 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').
File filter.rb
has 396 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Queries
# Overview
#
# This class manages params and nesting of filter queries.
File useFieldSync.js
has 393 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { onBeforeMount, ref, computed, watch } from 'vue'
import { Metadata, DataAttribute } from '@/routes/endpoints'
import { DATA_ATTRIBUTE_INTERNAL_ATTRIBUTE } from '@/constants'
import { QUERY_PARAMETER, PATTERN_TYPES } from '../constants'
import {
Method has too many lines. [57/25] Open
def data_models
allowed= %w{
AlternateValue
BiologicalAssociationsGraph
BiologicalRelationship
- 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 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
Method has too many lines. [56/25] Open
def self.gpx_to_csv(gpx_file, csv_options = {col_sep: "\t", headers: true, encoding: 'UTF-8', write_headers: true})
gpx_headers = %w(name geojson start_date end_date minimum_elevation maximum_elevation)
csv_string = CSV.generate(**csv_options) do |csv|
csv << gpx_headers
- 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.
Class Autocomplete
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class Query::Autocomplete < Queries::Query
include Arel::Nodes
include Queries::Concerns::Identifiers