Showing 928 of 12,577 total issues
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
Class Result
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class Result
# query string
attr_accessor :name
# how to match
Method has too many lines. [55/25] Open
def self.generate(otus, project_members, reference_csv = nil )
::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.
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"
Further reading
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) =>
Method has too many lines. [54/25] Open
def build_sequence_relationships
@total_data_lines = 0
i = 0
gene_descriptors = {}
gene_attributes = {}
- 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. [54/25] Open
def self.significant_digits(number_string)
# is there a decimal point?
intg = ''
decimal_point_zeros = ''
mantissa = ''
- 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. [53/25] Open
def perform_staging
records, headers = get_records(source.path)
update!(metadata:
metadata.merge({
- 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 371 lines of code (exceeds 250 allowed). Consider refactoring. Open
module FieldOccurrence::DwcExtensions
extend ActiveSupport::Concern
# include FieldOccurrence::DwcExtensions::TaxonworksExtensions
Method has too many lines. [52/25] Open
def get_diffs version_new, version_old
added_strings = []
added_strings_indices = []
deleted_strings = []
deleted_strings_indices = []
- 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 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
Method has too many lines. [51/25] Open
def build
v = object.valid_taxon_name
base_names = v.historical_taxon_names
base_names.each do |t|
- 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. [50/25] 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
- 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 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
Class Filter
has 34 methods (exceeds 20 allowed). Consider refactoring. Open
class Query::Filter < Queries::Query
include Queries::Concerns::Users
# include Queries::Concerns::Identifiers # Presently in Queries for other use in autocompletes