jcbantuelle/dominion-meteor

View on GitHub

Showing 1,158 of 1,158 total issues

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

      let discarded_cards = _.filter(player_cards.revealed, function(card) {
        return _.includes(_.words(card.types), 'action') || _.includes(_.words(card.types), 'treasure')
      })
Severity: Major
Found in app/cards/prosperity/rabble.js and 1 other location - About 2 hrs to fix
app/cards/nocturne/hexes/fear.js on lines 5..7

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

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

        } else if (this.card.name === 'Border Guard' && !this.discarder.game.turn.discarded_border_guard) {
          let has_horn = _.some(this.discarder.player_cards.artifacts, function(artifact) {
            return artifact.name == 'Horn'
          })
          if (has_horn) {
Severity: Major
Found in app/game/server/services/discard_event_processor.js and 1 other location - About 2 hrs to fix
app/game/server/services/discard_event_processor.js on lines 57..77

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

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

    card_revealer.reveal_from_deck_until((game, player_cards, revealed_cards) => {
      if (!_.isEmpty(revealed_cards)) {
        return _.includes(_.words(_.last(revealed_cards).types), 'treasure')
      } else {
        return false
Severity: Major
Found in app/cards/prosperity/venture.js and 2 other locations - About 2 hrs to fix
app/cards/nocturne/ghost.js on lines 13..19
app/cards/prosperity/loan.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 75.

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

        } else if (this.card.name === 'Alchemist') {
          let has_potions = _.some(this.discarder.player_cards.in_play, function(card) {
            return card.name === 'Potion'
          })
          if (has_potions) {
Severity: Major
Found in app/game/server/services/discard_event_processor.js and 1 other location - About 2 hrs to fix
app/game/server/services/discard_event_processor.js on lines 70..77

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

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

Function reveal_card has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  static reveal_card(game, player_cards, selected_cards) {
    let named_card
    if (!_.isEmpty(selected_cards)) {
      named_card = selected_cards[0].name
      game.log.push(`&nbsp;&nbsp;<strong>${player_cards.username}</strong> names ${CardView.render(selected_cards)}`)
Severity: Minor
Found in app/cards/dark_ages/rebuild.js - About 1 hr to fix

    Function buy has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      buy(game, player_cards) {
        let unique_cards = _.uniqBy(player_cards.hand, 'name')
    
        var chosen_card
        if (_.size(unique_cards) > 1) {
    Severity: Minor
    Found in app/cards/menagerie/events/banish.js - About 1 hr to fix

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

            let eligible_cards = _.filter(game.cards, function(card) {
              return card.count > 0 && card.supply && _.includes(_.words(card.top_card.types), 'treasure')
            })
      Severity: Major
      Found in app/cards/nocturne/tragic_hero.js and 1 other location - About 1 hr to fix
      app/cards/adventures/hero.js on lines 19..21

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

      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

          let eligible_cards = _.filter(game.cards, function(card) {
            return card.count > 0 && card.supply && _.includes(_.words(card.top_card.types), 'treasure')
          })
      Severity: Major
      Found in app/cards/adventures/hero.js and 1 other location - About 1 hr to fix
      app/cards/nocturne/tragic_hero.js on lines 22..24

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

      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

            } else if (event.event_type === 'Event') {
              let event_effect_index = _.findIndex(player_cards.start_turn_event_effects, function(event_effect) {
                return event_effect.id === event.id
              })
              player_cards.start_turn_event_effects.splice(event_effect_index, 1)
      Severity: Major
      Found in app/game/server/services/start_turn_event_processor.js and 1 other location - About 1 hr to fix
      app/game/server/services/start_turn_event_processor.js on lines 114..130

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

      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

            let eligible_cards = _.filter(game.cards, function(card) {
              return _.includes(_.words(card.top_card.types), 'action') && card.count > 0 && card.supply
            })
      Severity: Major
      Found in app/cards/intrigue/lurker.js and 1 other location - About 1 hr to fix
      app/cards/empires/events/salt_the_earth.js on lines 11..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 74.

      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

          let eligible_cards = _.filter(game.cards, function(card) {
            return _.includes(_.words(card.top_card.types), 'victory') && card.count > 0 && card.supply
          })
      Severity: Major
      Found in app/cards/empires/events/salt_the_earth.js and 1 other location - About 1 hr to fix
      app/cards/intrigue/lurker.js on lines 57..59

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

      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

            if (event.event_type === 'Duration') {
              let duration_effect_index = _.findIndex(player_cards.duration_effects, function(duration_effect) {
                return duration_effect.id === event.id
              })
              player_cards.duration_effects.splice(duration_effect_index, 1)
      Severity: Major
      Found in app/game/server/services/start_turn_event_processor.js and 1 other location - About 1 hr to fix
      app/game/server/services/start_turn_event_processor.js on lines 120..130

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

      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

      Function play has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        play(game, player_cards) {
          let card_mover = new CardMover(game, player_cards)
          let took_lost_in_the_woods = card_mover.take_unique_card('states', 'Lost In The Woods')
      
          if (took_lost_in_the_woods) {
      Severity: Minor
      Found in app/cards/nocturne/fool.js - About 1 hr to fix

        Function play has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          play(game, player_cards, card_player) {
            let card_drawer = new CardDrawer(game, player_cards, card_player)
            card_drawer.draw(1)
        
            let action_gainer = new ActionGainer(game, player_cards)
        Severity: Minor
        Found in app/cards/nocturne/pixie.js - About 1 hr to fix

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

              if (_.size(player_cards.hand) > 1) {
                let turn_event_id = TurnEventModel.insert({
                  game_id: game._id,
                  player_id: player_cards.player_id,
                  username: player_cards.username,
          Severity: Major
          Found in app/cards/intrigue/courtier.js and 4 other locations - About 1 hr to fix
          app/cards/dark_ages/count.js on lines 56..74
          app/cards/dark_ages/count.js on lines 76..94
          app/cards/empires/events/ritual.js on lines 12..32
          app/cards/renaissance/projects/city_gate.js on lines 11..31

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

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

                if (_.size(player_cards.hand) > 2) {
                  let turn_event_id = TurnEventModel.insert({
                    game_id: game._id,
                    player_id: player_cards.player_id,
                    username: player_cards.username,
          Severity: Major
          Found in app/cards/dark_ages/count.js and 4 other locations - About 1 hr to fix
          app/cards/dark_ages/count.js on lines 76..94
          app/cards/empires/events/ritual.js on lines 12..32
          app/cards/intrigue/courtier.js on lines 16..34
          app/cards/renaissance/projects/city_gate.js on lines 11..31

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

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

                if (_.size(player_cards.hand) > 1) {
                  GameModel.update(game._id, game)
                  PlayerCardsModel.update(game._id, player_cards)
                  let turn_event_id = TurnEventModel.insert({
                    game_id: game._id,
          Severity: Major
          Found in app/cards/empires/events/ritual.js and 4 other locations - About 1 hr to fix
          app/cards/dark_ages/count.js on lines 56..74
          app/cards/dark_ages/count.js on lines 76..94
          app/cards/intrigue/courtier.js on lines 16..34
          app/cards/renaissance/projects/city_gate.js on lines 11..31

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

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

                if (_.size(player_cards.hand) > 1) {
                  let turn_event_id = TurnEventModel.insert({
                    game_id: game._id,
                    player_id: player_cards.player_id,
                    username: player_cards.username,
          Severity: Major
          Found in app/cards/dark_ages/count.js and 4 other locations - About 1 hr to fix
          app/cards/dark_ages/count.js on lines 56..74
          app/cards/empires/events/ritual.js on lines 12..32
          app/cards/intrigue/courtier.js on lines 16..34
          app/cards/renaissance/projects/city_gate.js on lines 11..31

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

          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

                  return _.includes(BuyEventProcessor.event_cards().concat(BuyEventProcessor.in_play_event_cards()).concat(BuyEventProcessor.overpay_cards()).concat(BuyEventProcessor.duration_attack_cards()).concat(BuyEventProcessor.landmark_cards()).concat(['Embargo', 'Charm', 'Tax']), event.name)
          Severity: Major
          Found in app/game/server/services/buy_event_processor.js and 1 other location - About 1 hr to fix
          app/game/server/services/gain_event_processor.js on lines 338..338

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

          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

              return _.chain(player_cards).filter(function(card) {
                return _.includes(_.words(card.types), 'treasure')
              }).groupBy(function(card) {
                return card.name
              }).map(function(cards, card_name) {
          Severity: Major
          Found in app/cards/empires/landmarks/keep.js and 1 other location - About 1 hr to fix
          app/cards/empires/landmarks/triumphal_arch.js on lines 8..14

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

          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