SpeciesFileGroup/taxonworks

View on GitHub

Showing 1,083 of 12,571 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

export const Extract = {
  ...baseCRUD(controller, permitParams),
  ...annotations(controller),

  filter: (params) => AjaxCall('post', `/${controller}/filter.json`, params)
Severity: Major
Found in app/javascript/vue/routes/endpoints/Extract.js and 2 other locations - About 45 mins to fix
app/javascript/vue/routes/endpoints/Image.js on lines 28..33
app/javascript/vue/routes/endpoints/ObservationMatrixColumnItem.js on lines 16..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 50.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

          cite: [
            {
              label: 'Cited',
              key: 'history-is-cited',
              value: false,
Severity: Major
Found in app/javascript/vue/tasks/otu/browse/store/store.js and 2 other locations - About 45 mins to fix
app/javascript/vue/tasks/otu/browse/store/store.js on lines 31..44
app/javascript/vue/tasks/otu/browse/store/store.js on lines 56..69

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 50.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

export default function (state, args) {
  getObservationFromArgs(state, args).id = args.observationId
  getObservationFromArgs(state, args).global_id = args.global_id
};
app/javascript/vue/tasks/observation_matrices/matrix_column_coder/store/mutations/setObservationId.js on lines 3..6

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 50.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export default ({ commit }, ceId) => {
  Georeference.where({ collecting_event_id: ceId }).then((response) => {
    commit(MutationNames.SetGeoreferences, response.body)
  })
}
app/javascript/vue/tasks/otu/browse/store/actions/loadInformation.js on lines 28..34

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 50.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def self.validate_name_format(taxon_name)
    return true if taxon_name.name.length < 2
    taxon_name.errors.add(:name, 'name must be capitalized') unless  !taxon_name.name.blank? && taxon_name.name == taxon_name.name.capitalize
    taxon_name.errors.add(:name, 'name must end in -virus or -viroid or -satellite') if not(taxon_name.name =~ /.*(virus|viroid|satellite)\Z/)
Severity: Major
Found in app/models/nomenclatural_rank/icvcn/genus.rb and 6 other locations - About 45 mins to fix
app/models/nomenclatural_rank/icvcn/class_rank.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/family.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/order.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/phylum.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/species.rb on lines 7..10
app/models/nomenclatural_rank/icvcn/subfamily.rb on lines 7..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 39.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def self.validate_name_format(taxon_name)
    return true if taxon_name.name.length < 2
    taxon_name.errors.add(:name, 'name must be capitalized') unless  !taxon_name.name.blank? && taxon_name.name == taxon_name.name.capitalize
    taxon_name.errors.add(:name, 'the last name should be virus or viroid or satellite') if not(taxon_name.name =~ /.*( virus| viroid| satellite)\Z/)
Severity: Major
Found in app/models/nomenclatural_rank/icvcn/species.rb and 6 other locations - About 45 mins to fix
app/models/nomenclatural_rank/icvcn/class_rank.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/family.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/genus.rb on lines 7..10
app/models/nomenclatural_rank/icvcn/order.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/phylum.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/subfamily.rb on lines 7..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 39.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def self.validate_name_format(taxon_name)
    return true if taxon_name.name.length < 2
    taxon_name.errors.add(:name, 'name must be capitalized') unless  !taxon_name.name.blank? && taxon_name.name == taxon_name.name.capitalize
    taxon_name.errors.add(:name, 'name must end in -virinae or -viroinae or -satellitinae') if not(taxon_name.name =~ /.*(virinae|viroinae|satellitinae)\Z/)
Severity: Major
Found in app/models/nomenclatural_rank/icvcn/subfamily.rb and 6 other locations - About 45 mins to fix
app/models/nomenclatural_rank/icvcn/class_rank.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/family.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/genus.rb on lines 7..10
app/models/nomenclatural_rank/icvcn/order.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/phylum.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/species.rb on lines 7..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 39.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def self.validate_name_format(taxon_name)
    return true if taxon_name.name.length < 2
    taxon_name.errors.add(:name, 'name must be capitalized') unless  !taxon_name.name.blank? && taxon_name.name == taxon_name.name.capitalize
    taxon_name.errors.add(:name, 'name must end in -viricota') if not(taxon_name.name =~ /.*(viricota)\Z/)
Severity: Major
Found in app/models/nomenclatural_rank/icvcn/phylum.rb and 6 other locations - About 45 mins to fix
app/models/nomenclatural_rank/icvcn/class_rank.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/family.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/genus.rb on lines 7..10
app/models/nomenclatural_rank/icvcn/order.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/species.rb on lines 7..10
app/models/nomenclatural_rank/icvcn/subfamily.rb on lines 7..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 39.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def self.validate_name_format(taxon_name)
    return true if taxon_name.name.length < 2
    taxon_name.errors.add(:name, 'name must be capitalized') unless  !taxon_name.name.blank? && taxon_name.name == taxon_name.name.capitalize
    taxon_name.errors.add(:name, 'name must end in -virales') if not(taxon_name.name =~ /.*(virales)\Z/)
Severity: Major
Found in app/models/nomenclatural_rank/icvcn/order.rb and 6 other locations - About 45 mins to fix
app/models/nomenclatural_rank/icvcn/class_rank.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/family.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/genus.rb on lines 7..10
app/models/nomenclatural_rank/icvcn/phylum.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/species.rb on lines 7..10
app/models/nomenclatural_rank/icvcn/subfamily.rb on lines 7..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 39.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def self.validate_name_format(taxon_name)
    return true if taxon_name.name.length < 2
    taxon_name.errors.add(:name, 'name must be capitalized') unless  !taxon_name.name.blank? && taxon_name.name == taxon_name.name.capitalize
    taxon_name.errors.add(:name, 'name must end in -viridae or -viroidae or -satellitidae') if not(taxon_name.name =~ /.*(viridae|viroidae|satellitidae)\Z/)
Severity: Major
Found in app/models/nomenclatural_rank/icvcn/family.rb and 6 other locations - About 45 mins to fix
app/models/nomenclatural_rank/icvcn/class_rank.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/genus.rb on lines 7..10
app/models/nomenclatural_rank/icvcn/order.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/phylum.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/species.rb on lines 7..10
app/models/nomenclatural_rank/icvcn/subfamily.rb on lines 7..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 39.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def self.validate_name_format(taxon_name)
    return true if taxon_name.name.length < 2
    taxon_name.errors.add(:name, 'name must be capitalized') unless  !taxon_name.name.blank? && taxon_name.name == taxon_name.name.capitalize
    taxon_name.errors.add(:name, 'name must end in -viricetes') if not(taxon_name.name =~ /.*(viricetes)\Z/)
Severity: Major
Found in app/models/nomenclatural_rank/icvcn/class_rank.rb and 6 other locations - About 45 mins to fix
app/models/nomenclatural_rank/icvcn/family.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/genus.rb on lines 7..10
app/models/nomenclatural_rank/icvcn/order.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/phylum.rb on lines 22..25
app/models/nomenclatural_rank/icvcn/species.rb on lines 7..10
app/models/nomenclatural_rank/icvcn/subfamily.rb on lines 7..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 39.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      def autocomplete_taxon_name_determined_as
        t = taxon_name_table[:name].matches_any(terms).or(taxon_name_table[:cached].matches_any(terms) )

        ::CollectionObject.
          includes(:identifiers, taxon_determinations: [otu: :taxon_name]).
Severity: Minor
Found in lib/queries/collection_object/autocomplete.rb and 1 other location - About 45 mins to fix
lib/queries/field_occurrence/autocomplete.rb on lines 21..29

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 39.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  def index
    respond_to do |format|
      format.html {
        @recent_objects = LoanItem.recent_from_project_id(sessions_current_project_id).order(updated_at: :desc).limit(10)
        render '/shared/data/all/index'
Severity: Major
Found in app/controllers/loan_items_controller.rb and 2 other locations - About 45 mins to fix
app/controllers/labels_controller.rb on lines 8..18
app/controllers/type_materials_controller.rb on lines 8..18

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 39.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  def index
    respond_to do |format|
      format.html do
        @recent_objects = Label.recent_from_project_id(sessions_current_project_id).order(updated_at: :desc).limit(10)
        render '/shared/data/all/index'
Severity: Major
Found in app/controllers/labels_controller.rb and 2 other locations - About 45 mins to fix
app/controllers/loan_items_controller.rb on lines 9..19
app/controllers/type_materials_controller.rb on lines 8..18

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 39.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      def autocomplete_taxon_name_determined_as
        t = taxon_name_table[:name].matches_any(terms).or(taxon_name_table[:cached].matches_any(terms) )

        ::FieldOccurrence.
          includes(:identifiers, taxon_determinations: [otu: :taxon_name]).
Severity: Minor
Found in lib/queries/field_occurrence/autocomplete.rb and 1 other location - About 45 mins to fix
lib/queries/collection_object/autocomplete.rb on lines 26..34

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 39.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  def index
    respond_to do |format|
      format.html do
        @recent_objects = TypeMaterial.recent_from_project_id(sessions_current_project_id).order(updated_at: :desc).limit(10)
        render '/shared/data/all/index'
Severity: Major
Found in app/controllers/type_materials_controller.rb and 2 other locations - About 45 mins to fix
app/controllers/labels_controller.rb on lines 8..18
app/controllers/loan_items_controller.rb on lines 9..19

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 39.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

const permitParams = {
  namespace: {
    id: Number,
    institution: String,
    name: String,
Severity: Major
Found in app/javascript/vue/routes/endpoints/Namespace.js and 5 other locations - About 40 mins to fix
app/javascript/vue/routes/endpoints/Container.js on lines 4..14
app/javascript/vue/routes/endpoints/ContainerItem.js on lines 3..13
app/javascript/vue/routes/endpoints/DataAttribute.js on lines 5..15
app/javascript/vue/routes/endpoints/Identifier.js on lines 4..14
app/javascript/vue/routes/endpoints/Role.js on lines 3..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

const permitParams = {
  container: {
    parent_id: Number,
    type: String,
    name: String,
Severity: Major
Found in app/javascript/vue/routes/endpoints/Container.js and 5 other locations - About 40 mins to fix
app/javascript/vue/routes/endpoints/ContainerItem.js on lines 3..13
app/javascript/vue/routes/endpoints/DataAttribute.js on lines 5..15
app/javascript/vue/routes/endpoints/Identifier.js on lines 4..14
app/javascript/vue/routes/endpoints/Namespace.js on lines 3..13
app/javascript/vue/routes/endpoints/Role.js on lines 3..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

const permitParams = {
  container_item: {
    global_entity: String,
    contained_object_id: Number,
    contained_object_type: String,
Severity: Major
Found in app/javascript/vue/routes/endpoints/ContainerItem.js and 5 other locations - About 40 mins to fix
app/javascript/vue/routes/endpoints/Container.js on lines 4..14
app/javascript/vue/routes/endpoints/DataAttribute.js on lines 5..15
app/javascript/vue/routes/endpoints/Identifier.js on lines 4..14
app/javascript/vue/routes/endpoints/Namespace.js on lines 3..13
app/javascript/vue/routes/endpoints/Role.js on lines 3..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

const permitParams = {
  data_attribute: {
    annotated_global_entity: String,
    attribute_subject_id: Number,
    attribute_subject_type: String,
Severity: Major
Found in app/javascript/vue/routes/endpoints/DataAttribute.js and 5 other locations - About 40 mins to fix
app/javascript/vue/routes/endpoints/Container.js on lines 4..14
app/javascript/vue/routes/endpoints/ContainerItem.js on lines 3..13
app/javascript/vue/routes/endpoints/Identifier.js on lines 4..14
app/javascript/vue/routes/endpoints/Namespace.js on lines 3..13
app/javascript/vue/routes/endpoints/Role.js on lines 3..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language