af83/chouette-core

View on GitHub

Showing 922 of 922 total issues

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

    dates = case date_type.to_sym
    when :before
      dates.where('date < ?', self.begin_date)
    when :after
      dates.where('date > ?', self.begin_date)
Severity: Minor
Found in app/models/concerns/clean_up_methods.rb and 1 other location - About 45 mins to fix
app/models/concerns/clean_up_methods.rb on lines 79..87

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 40.

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

  class Line < Queries::BaseQuery
    description 'Find a line'

    argument :objectid, String, required: false
    argument :registration_number, String, required: false
Severity: Minor
Found in app/graphql/queries/line.rb and 1 other location - About 45 mins to fix
app/graphql/queries/stop_area.rb on lines 2..11

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 40.

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

    periods = case date_type.to_sym
    when :before
      periods.where('period_end < ?', self.begin_date)
    when :after
      periods.where('period_start > ?', self.begin_date)
Severity: Minor
Found in app/models/concerns/clean_up_methods.rb and 1 other location - About 45 mins to fix
app/models/concerns/clean_up_methods.rb on lines 63..71

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 40.

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 closest_children
      return self.children if position.blank?

      parent_point = self.class.connection.quote("SRID=4326;POINT(#{longitude} #{latitude})")
      child_point   = "ST_SetSRID(ST_MakePoint(longitude, latitude), 4326)"
Severity: Minor
Found in app/models/chouette/stop_area.rb and 1 other location - About 45 mins to fix
app/models/chouette/stop_area.rb on lines 276..282

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 40.

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 4 locations. Consider refactoring.
Open

    styles={{
      control: (provided) => ({
        ...provided,
        minHeight: '51px',
        height: '51px'
app/packs/src/vehicle_journeys/components/tools/select2s/MissionSelect2.js on lines 28..35
app/packs/src/vehicle_journeys/components/tools/select2s/TimetableSelect2.js on lines 28..35
app/packs/src/vehicle_journeys/components/tools/select2s/VJSelect2.js on lines 15..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 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 4 locations. Consider refactoring.
Open

    styles={{
      control: (provided) => ({
        ...provided,
        minHeight: '51px',
        height: '51px'
app/packs/src/vehicle_journeys/components/tools/select2s/CompanySelect2.js on lines 37..44
app/packs/src/vehicle_journeys/components/tools/select2s/TimetableSelect2.js on lines 28..35
app/packs/src/vehicle_journeys/components/tools/select2s/VJSelect2.js on lines 15..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 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 4 locations. Consider refactoring.
Open

    styles={{
      control: (provided) => ({
        ...provided,
        minHeight: '51px',
        height: '51px'
app/packs/src/vehicle_journeys/components/tools/select2s/CompanySelect2.js on lines 37..44
app/packs/src/vehicle_journeys/components/tools/select2s/MissionSelect2.js on lines 28..35
app/packs/src/vehicle_journeys/components/tools/select2s/TimetableSelect2.js on lines 28..35

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 4 locations. Consider refactoring.
Open

    styles={{
      control: (provided) => ({
        ...provided,
        minHeight: '51px',
        height: '51px'
app/packs/src/vehicle_journeys/components/tools/select2s/CompanySelect2.js on lines 37..44
app/packs/src/vehicle_journeys/components/tools/select2s/MissionSelect2.js on lines 28..35
app/packs/src/vehicle_journeys/components/tools/select2s/VJSelect2.js on lines 15..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 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 2 locations. Consider refactoring.
Open

    case 'SELECT_SPECIFIC_STOP':
      return state.map((vj, i) => {
        if (vj.selected){
          return vehicleJourney(vj, action, true)
        }else{
Severity: Minor
Found in app/packs/src/vehicle_journeys/reducers/vehicleJourneys.js and 1 other location - About 40 mins to fix
app/packs/src/vehicle_journeys/reducers/vehicleJourneys.js on lines 294..301

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 2 locations. Consider refactoring.
Open

    case 'SHIFT_VEHICLEJOURNEY':
      return state.map((vj, i) => {
        if (vj.selected){
          return vehicleJourney(vj, action, true)
        }else{
Severity: Minor
Found in app/packs/src/vehicle_journeys/reducers/vehicleJourneys.js and 1 other location - About 40 mins to fix
app/packs/src/vehicle_journeys/reducers/vehicleJourneys.js on lines 302..309

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

Consider simplifying this complex logical expression.
Open

        if(hasError == true) {
          dispatch(actions.unavailableServer())
        } else {
          let i = 0
          while(i < json.vehicle_journeys.length){
Severity: Major
Found in app/packs/src/vehicle_journeys/actions/index.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

        if(this.props.status.fetchSuccess == true) {
          return (
            <li className='st_action'>
              <button
                type='button'
    Severity: Major
    Found in app/packs/src/vehicle_journeys/components/tools/CreateModal.js - About 40 mins to fix

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

              <p>
                <strong>{I18n.t('routes.edit.map.stop_point_type')} : </strong>
                {olMap.json.area_type}
              </p>
      Severity: Major
      Found in app/packs/src/routes/components/OlMap.js and 5 other locations - About 40 mins to fix
      app/packs/src/routes/components/OlMap.js on lines 95..98
      app/packs/src/routes/components/OlMap.js on lines 99..102
      app/packs/src/routes/components/OlMap.js on lines 110..113
      app/packs/src/routes/components/OlMap.js on lines 114..117
      app/packs/src/routes/components/OlMap.js on lines 118..121

      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 48.

      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

        resetValidation: (target) => {
          $(target).parent().removeClass('has-error').children('.help-block').remove()
        },
      Severity: Minor
      Found in app/packs/src/vehicle_journeys/actions/index.js and 1 other location - About 40 mins to fix
      app/packs/src/journey_patterns/actions/index.js on lines 104..106

      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 48.

      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

              <p>
                <strong>{I18n.t('id_reflex')} : </strong>
                {olMap.json.user_objectid}
              </p>
      Severity: Major
      Found in app/packs/src/routes/components/OlMap.js and 5 other locations - About 40 mins to fix
      app/packs/src/routes/components/OlMap.js on lines 91..94
      app/packs/src/routes/components/OlMap.js on lines 95..98
      app/packs/src/routes/components/OlMap.js on lines 110..113
      app/packs/src/routes/components/OlMap.js on lines 114..117
      app/packs/src/routes/components/OlMap.js on lines 118..121

      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 48.

      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

        resetValidation: (target) => {
          $(target).parent().removeClass('has-error').children('.help-block').remove()
        },
      Severity: Minor
      Found in app/packs/src/journey_patterns/actions/index.js and 1 other location - About 40 mins to fix
      app/packs/src/vehicle_journeys/actions/index.js on lines 252..254

      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 48.

      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

              <p>
                <strong>{I18n.t('routes.edit.map.comment')} : </strong>
                {olMap.json.comment}
              </p>
      Severity: Major
      Found in app/packs/src/routes/components/OlMap.js and 5 other locations - About 40 mins to fix
      app/packs/src/routes/components/OlMap.js on lines 91..94
      app/packs/src/routes/components/OlMap.js on lines 95..98
      app/packs/src/routes/components/OlMap.js on lines 99..102
      app/packs/src/routes/components/OlMap.js on lines 110..113
      app/packs/src/routes/components/OlMap.js on lines 114..117

      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 48.

      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

              <p>
                <strong>{I18n.t('routes.edit.map.postal_code')} : </strong>
                {olMap.json.zip_code}
              </p>
      Severity: Major
      Found in app/packs/src/routes/components/OlMap.js and 5 other locations - About 40 mins to fix
      app/packs/src/routes/components/OlMap.js on lines 91..94
      app/packs/src/routes/components/OlMap.js on lines 95..98
      app/packs/src/routes/components/OlMap.js on lines 99..102
      app/packs/src/routes/components/OlMap.js on lines 114..117
      app/packs/src/routes/components/OlMap.js on lines 118..121

      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 48.

      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

              <p>
                <strong>{I18n.t('routes.edit.map.short_name')} : </strong>
                {olMap.json.short_name}
              </p>
      Severity: Major
      Found in app/packs/src/routes/components/OlMap.js and 5 other locations - About 40 mins to fix
      app/packs/src/routes/components/OlMap.js on lines 91..94
      app/packs/src/routes/components/OlMap.js on lines 99..102
      app/packs/src/routes/components/OlMap.js on lines 110..113
      app/packs/src/routes/components/OlMap.js on lines 114..117
      app/packs/src/routes/components/OlMap.js on lines 118..121

      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 48.

      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

              <p>
                <strong>{I18n.t('routes.edit.map.city')} : </strong>
                {olMap.json.city_name}
              </p>
      Severity: Major
      Found in app/packs/src/routes/components/OlMap.js and 5 other locations - About 40 mins to fix
      app/packs/src/routes/components/OlMap.js on lines 91..94
      app/packs/src/routes/components/OlMap.js on lines 95..98
      app/packs/src/routes/components/OlMap.js on lines 99..102
      app/packs/src/routes/components/OlMap.js on lines 110..113
      app/packs/src/routes/components/OlMap.js on lines 118..121

      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 48.

      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