smalruby/smalruby-editor

View on GitHub

Showing 47 of 47 total issues

Class Base has 27 methods (exceeds 20 allowed). Consider refactoring.
Open

    class Base
      STRING_RE = '\s*("[^"]*"|\'[^\']*\')\s*'

      attr_accessor :parent
      attr_accessor :prev_sibling
Severity: Minor
Found in app/models/concerns/ruby_to_block/block/base.rb - About 3 hrs to fix

    File ja.js has 253 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    goog.provide('Blockly.Msg.ja.smalruby');
    
    goog.require('Blockly.Msg');
    
    
    
    Severity: Minor
    Found in app/assets/javascripts/msg/ja.js - About 2 hrs to fix

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

        module Block
          class HardwareSmalrubotSensorValue < Value
            include CharacterOperation
            include HardwareOperation
      
      
      app/models/concerns/ruby_to_block/block/hardware_smalrubot_dc_motor_power_ratio.rb on lines 2..25

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

      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

        module Block
          class HardwareSmalrubotDcMotorPowerRatio < Value
            include CharacterOperation
            include HardwareOperation
      
      
      app/models/concerns/ruby_to_block/block/hardware_smalrubot_sensor_value.rb on lines 2..27

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

      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

        module Block
          class MotionPointTowardsCharacter < CharacterMethodCall
            blocknize '^\s*' + CHAR_RE + 'point_towards\(' + CHAR_NAME_RE + '\)\s*$',
                      statement: true
      
      
      app/models/concerns/ruby_to_block/block/motion_go_to_character.rb on lines 3..20

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

      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

        module Block
          class MotionGoToCharacter < CharacterMethodCall
            blocknize '^\s*' + CHAR_RE + 'go_to\(' + CHAR_NAME_RE + '\)\s*$',
                      statement: true
      
      
      app/models/concerns/ruby_to_block/block/motion_point_towards_character.rb on lines 3..20

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

      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

      Method summary has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

        def summary
          res = {}
          if xml?
            res[:filename] = filename.sub(/\.xml\z/, '')
      
      
      Severity: Minor
      Found in app/models/source_code.rb - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

        module Block
          class HardwareSmalrubotActionWithSec < CharacterMethodCall
            include HardwareOperation
      
            # rubocop:disable LineLength
      app/models/concerns/ruby_to_block/block/hardware_smalrubot_dc_motor_set_power_ratio.rb on lines 3..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 56.

      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

        module Block
          class HardwareSmalrubotDcMotorSetPowerRatio < CharacterMethodCall
            include HardwareOperation
      
            blocknize ['^\s*',
      app/models/concerns/ruby_to_block/block/hardware_smalrubot_action_with_sec.rb on lines 3..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 56.

      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 initialize has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

        initialize: function() {
          if (!this.get('filename')) {
            var filename = Smalruby.Views.MainMenuView.getFilename();
            if (filename.length == 0) {
              filename = Smalruby.SourceCode.defaultFilename();
      Severity: Minor
      Found in app/assets/javascripts/models/source_code.js - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method parse_ruby_error_messages has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

        def parse_ruby_error_messages(stderr_str)
          if SmalrubyEditor.windows?
            stderr_str = NKF.nkf("-w", stderr_str)
          end
          stderr_str.lines.each.with_object([]) { |line, res|
      Severity: Minor
      Found in app/models/source_code.rb - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

        module Block
          class MotionChangeXBy < CharacterMethodCall
            blocknize '^\s*' + CHAR_RE + 'x\s*\+=\s*(\S+)\s*$',
                      statement: true, inline: true
      
      
      Severity: Minor
      Found in app/models/concerns/ruby_to_block/block/motion_change_x_by.rb and 1 other location - About 55 mins to fix
      app/models/concerns/ruby_to_block/block/motion_change_y_by.rb on lines 3..16

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

      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

        module Block
          class MotionRotateRight < CharacterMethodCall
            blocknize '^\s*' + CHAR_RE + 'rotate\(\+?(\d+)\)\s*$',
                      statement: true, inline: true
      
      
      Severity: Major
      Found in app/models/concerns/ruby_to_block/block/motion_rotate_right.rb and 2 other locations - About 55 mins to fix
      app/models/concerns/ruby_to_block/block/looks_say.rb on lines 3..16
      app/models/concerns/ruby_to_block/block/motion_rotate_left.rb on lines 3..16

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

      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 self.process_match_data(md, context)
              md2 = regexp.match(md[type])
      
              character = get_character(context, md2[1])
              return false if context.receiver && context.receiver != character
      app/models/concerns/ruby_to_block/block/hardware_two_wheel_drive_car_speed.rb on lines 12..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 45.

      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

        module Block
          class MotionSelfX < Value
            include CharacterOperation
      
            blocknize '^\s*' + CHAR_RE + 'x\s*$',
      Severity: Major
      Found in app/models/concerns/ruby_to_block/block/motion_self_x.rb and 3 other locations - About 55 mins to fix
      app/models/concerns/ruby_to_block/block/motion_self_angle.rb on lines 2..19
      app/models/concerns/ruby_to_block/block/motion_self_y.rb on lines 2..19
      app/models/concerns/ruby_to_block/block/sensing_reach_wall.rb on lines 3..20

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

      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

        module Block
          class MotionSelfAngle < Value
            include CharacterOperation
      
            blocknize '^\s*' + CHAR_RE + 'angle\s*$',
      Severity: Major
      Found in app/models/concerns/ruby_to_block/block/motion_self_angle.rb and 3 other locations - About 55 mins to fix
      app/models/concerns/ruby_to_block/block/motion_self_x.rb on lines 2..19
      app/models/concerns/ruby_to_block/block/motion_self_y.rb on lines 2..19
      app/models/concerns/ruby_to_block/block/sensing_reach_wall.rb on lines 3..20

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

      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

        module Block
          class MotionSelfY < Value
            include CharacterOperation
      
            blocknize '^\s*' + CHAR_RE + 'y\s*$',
      Severity: Major
      Found in app/models/concerns/ruby_to_block/block/motion_self_y.rb and 3 other locations - About 55 mins to fix
      app/models/concerns/ruby_to_block/block/motion_self_angle.rb on lines 2..19
      app/models/concerns/ruby_to_block/block/motion_self_x.rb on lines 2..19
      app/models/concerns/ruby_to_block/block/sensing_reach_wall.rb on lines 3..20

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

      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

        module Block
          class MotionChangeYBy < CharacterMethodCall
            blocknize '^\s*' + CHAR_RE + 'y\s*\+=\s*(\S+)\s*$',
                      statement: true, inline: true
      
      
      Severity: Minor
      Found in app/models/concerns/ruby_to_block/block/motion_change_y_by.rb and 1 other location - About 55 mins to fix
      app/models/concerns/ruby_to_block/block/motion_change_x_by.rb on lines 3..16

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

      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

        module Block
          class MotionRotateLeft < CharacterMethodCall
            blocknize '^\s*' + CHAR_RE + 'rotate\(\-(\d+)\)\s*$',
                      statement: true, inline: true
      
      
      Severity: Major
      Found in app/models/concerns/ruby_to_block/block/motion_rotate_left.rb and 2 other locations - About 55 mins to fix
      app/models/concerns/ruby_to_block/block/looks_say.rb on lines 3..16
      app/models/concerns/ruby_to_block/block/motion_rotate_right.rb on lines 3..16

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

      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

        module Block
          class SensingReachWall < Value
            include CharacterOperation
      
            blocknize '^\s*' + CHAR_RE + 'reach_wall\?\s*$',
      Severity: Major
      Found in app/models/concerns/ruby_to_block/block/sensing_reach_wall.rb and 3 other locations - About 55 mins to fix
      app/models/concerns/ruby_to_block/block/motion_self_angle.rb on lines 2..19
      app/models/concerns/ruby_to_block/block/motion_self_x.rb on lines 2..19
      app/models/concerns/ruby_to_block/block/motion_self_y.rb on lines 2..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 45.

      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