SpeciesFileGroup/taxonworks

View on GitHub
app/models/taxon_name.rb

Summary

Maintainability
A
0 mins
Test Coverage

TODO found
Open

  # TODO: deprecate all of these for where()
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: move to protonym spec?
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # ?? TODO: Replace with `taxonomy` object .to_h?
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  #    TODO: on third thought- eliminate this mess
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: move some of these down to Protonym when they don't apply to Combination
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: revisit?
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

    # TODO: build author year from cached author and year, not the other way around
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: in refactor these are often just helper methods ,
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: this should be paginated, not all IDs!
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

        rescue # TODO: Qualify this!!
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: think of a different name, and test
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: remove, this is only used for a strange call in sv_checked cached.
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: Combinations shouldn't have classifications or relationships?  Move to Protonym?
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: belongs in lib/queries/filter.rb likely
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: should be moved to helpers
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: this was not implemented and tested properly
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: this needs to go.
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

      a[0] = a[0][1..-2] ## remove parentheses in the author string # TODO: draw from cached_author
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # !! TODO: when name is a subgenus will not grab genus
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # !! TODO: Higher classification does not follow the same pattern
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  #    TODO: does this form of the name contain parens for subgenus?
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: remove, this is handled natively
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: move to combination spec?
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: what is this:!? :)
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

    # TODO: Isolate and optimize. These an be isolated as they are not always pertinent to a generalized cascading cache setting
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

        .reload # TODO Why needed? Should not be
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

    # !! TODO: create a persisted only version of this for speed
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: This method can be placed elsewhere inside this class (or even removed if not used)
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  #    TODO: provide a default to gender (but do NOT eliminate param)
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: this should be paginated, not all IDs!
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: move to Protonym when we eliminate TaxonName.new()
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # return [String, nil, false] # TODO: fix
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: move to protonym spec?
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: We need to isolate this into 2 subclasses,
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: This can be made more specific, we don't need to call some of the methods in set_cached
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: remove
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: remove
Severity: Minor
Found in app/models/taxon_name.rb by fixme

TODO found
Open

  # TODO: cleanly isolate getters, setters, and cached builders
Severity: Minor
Found in app/models/taxon_name.rb by fixme

unexpected token tCOMMA (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

    Otu.create(by: creator, project_id:, taxon_name_id: id)
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token kEND (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

  end
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

      a = klass.touched_by(user_id).where(project_id:).order(updated_at: :desc).limit(6).to_a
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

    mri = ObservationMatrixRowItem::TaxonNameRowItem.where(taxon_name_id: id, project_id:).limit(1)
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

else without rescue is useless (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

    else
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRCURLY (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

    }
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

      if !parent_is_set? && TaxonName.where(parent_id: nil, project_id:).count > 0
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

    if siblings.where(project_id:).any?
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

else without rescue is useless (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

    else
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

      .where(project_id:)
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

  scope :with_parent_id, -> (parent_id) {where(parent_id:)}
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

  scope :with_type, -> (type) {where(type:)}
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

    if siblings.where(project_id:).any?
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token kEND (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

  end
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token kEND (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

  end
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tCOMMA (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

    TaxonName.where(project_id:, updated_by_id: user_id)
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRCURLY (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

           .where(taxon_names: {project_id:})
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

  scope :with_cached_valid_taxon_name_id, -> (cached_valid_taxon_name_id) {where(cached_valid_taxon_name_id:)}
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

      a = klass.is_species_group.touched_by(user_id).where(project_id:).order(updated_at: :desc).limit(6).to_a
Severity: Minor
Found in app/models/taxon_name.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

There are no issues that match your filters.

Category
Status