centosadmin/tdlib-ruby

View on GitHub

Showing 65 of 65 total issues

File client_methods.rb has 1412 lines of code (exceeds 250 allowed). Consider refactoring.
Open

module TD::ClientMethods
  # Accepts an incoming call.
  #
  # @param call_id [Integer] Call identifier.
  # @param protocol [TD::Types::CallProtocol] Description of the call protocols supported by the client.
Severity: Major
Found in lib/tdlib/client_methods.rb - About 3 days to fix

    File types.rb has 872 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    require 'dry-struct'
    require 'dry-types'
    
    module TD::Types
      include Dry::Types.module
    Severity: Major
    Found in lib/tdlib/types.rb - About 2 days to fix

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

        class SupergroupFullInfo < Base
          attribute :description, TD::Types::String
          attribute :member_count, TD::Types::Integer
          attribute :administrator_count, TD::Types::Integer
          attribute :restricted_count, TD::Types::Integer
      Severity: Major
      Found in lib/tdlib/types/supergroup_full_info.rb and 1 other location - About 1 hr to fix
      lib/tdlib/types/session.rb on lines 23..38

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

      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 Session < Base
          attribute :id, TD::Types::Integer
          attribute :is_current, TD::Types::Bool
          attribute :api_id, TD::Types::Integer
          attribute :application_name, TD::Types::String
      Severity: Major
      Found in lib/tdlib/types/session.rb and 1 other location - About 1 hr to fix
      lib/tdlib/types/supergroup_full_info.rb on lines 23..38

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

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

        def wrap(object)
          # Wrapping each entry in array
          if object.kind_of?(::Array)
            object.map { |o| wrap(o) }
          elsif object.kind_of?(::Hash)
      Severity: Minor
      Found in lib/tdlib/types.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

        class InputInlineQueryResult::Article < InputInlineQueryResult
          attribute :id, TD::Types::String
          attribute :url, TD::Types::String
          attribute :hide_url, TD::Types::Bool
          attribute :title, TD::Types::String
      Severity: Major
      Found in lib/tdlib/types/input_inline_query_result/article.rb and 1 other location - About 1 hr to fix
      lib/tdlib/types/input_inline_query_result/document.rb on lines 17..28

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

      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 InputInlineQueryResult::Document < InputInlineQueryResult
          attribute :id, TD::Types::String
          attribute :title, TD::Types::String
          attribute :description, TD::Types::String
          attribute :document_url, TD::Types::String
      Severity: Major
      Found in lib/tdlib/types/input_inline_query_result/document.rb and 1 other location - About 1 hr to fix
      lib/tdlib/types/input_inline_query_result/article.rb on lines 16..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 54.

      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 ChatEventLogFilters < Base
          attribute :message_edits, TD::Types::Bool
          attribute :message_deletions, TD::Types::Bool
          attribute :message_pins, TD::Types::Bool
          attribute :member_joins, TD::Types::Bool
      Severity: Major
      Found in lib/tdlib/types/chat_event_log_filters.rb and 1 other location - About 1 hr to fix
      lib/tdlib/types/personal_details.rb on lines 14..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 52.

      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 PersonalDetails < Base
          attribute :first_name, TD::Types::String
          attribute :middle_name, TD::Types::String
          attribute :last_name, TD::Types::String
          attribute :native_first_name, TD::Types::String
      Severity: Major
      Found in lib/tdlib/types/personal_details.rb and 1 other location - About 1 hr to fix
      lib/tdlib/types/chat_event_log_filters.rb on lines 15..26

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

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

        def broadcast(query)
          return dead_client_promise if dead?
      
          Promises.future do
            condition = ConditionVariable.new
      Severity: Minor
      Found in lib/tdlib/client.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 5 locations. Consider refactoring.
      Open

        class ChatMemberStatus::Administrator < ChatMemberStatus
          attribute :can_be_edited, TD::Types::Bool
          attribute :can_change_info, TD::Types::Bool
          attribute :can_post_messages, TD::Types::Bool
          attribute :can_edit_messages, TD::Types::Bool
      Severity: Major
      Found in lib/tdlib/types/chat_member_status/administrator.rb and 4 other locations - About 1 hr to fix
      lib/tdlib/types/input_inline_query_result/animated_gif.rb on lines 15..25
      lib/tdlib/types/input_inline_query_result/animated_mpeg4.rb on lines 16..26
      lib/tdlib/types/input_inline_query_result/location.rb on lines 16..26
      lib/tdlib/types/input_inline_query_result/photo.rb on lines 14..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 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 5 locations. Consider refactoring.
      Open

        class InputInlineQueryResult::AnimatedGif < InputInlineQueryResult
          attribute :id, TD::Types::String
          attribute :title, TD::Types::String
          attribute :thumbnail_url, TD::Types::String
          attribute :gif_url, TD::Types::String
      Severity: Major
      Found in lib/tdlib/types/input_inline_query_result/animated_gif.rb and 4 other locations - About 1 hr to fix
      lib/tdlib/types/chat_member_status/administrator.rb on lines 18..28
      lib/tdlib/types/input_inline_query_result/animated_mpeg4.rb on lines 16..26
      lib/tdlib/types/input_inline_query_result/location.rb on lines 16..26
      lib/tdlib/types/input_inline_query_result/photo.rb on lines 14..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 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 5 locations. Consider refactoring.
      Open

        class InputInlineQueryResult::Photo < InputInlineQueryResult
          attribute :id, TD::Types::String
          attribute :title, TD::Types::String
          attribute :description, TD::Types::String
          attribute :thumbnail_url, TD::Types::String
      Severity: Major
      Found in lib/tdlib/types/input_inline_query_result/photo.rb and 4 other locations - About 1 hr to fix
      lib/tdlib/types/chat_member_status/administrator.rb on lines 18..28
      lib/tdlib/types/input_inline_query_result/animated_gif.rb on lines 15..25
      lib/tdlib/types/input_inline_query_result/animated_mpeg4.rb on lines 16..26
      lib/tdlib/types/input_inline_query_result/location.rb on lines 16..26

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

        class InputInlineQueryResult::AnimatedMpeg4 < InputInlineQueryResult
          attribute :id, TD::Types::String
          attribute :title, TD::Types::String
          attribute :thumbnail_url, TD::Types::String
          attribute :mpeg4_url, TD::Types::String
      lib/tdlib/types/chat_member_status/administrator.rb on lines 18..28
      lib/tdlib/types/input_inline_query_result/animated_gif.rb on lines 15..25
      lib/tdlib/types/input_inline_query_result/location.rb on lines 16..26
      lib/tdlib/types/input_inline_query_result/photo.rb on lines 14..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 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 5 locations. Consider refactoring.
      Open

        class InputInlineQueryResult::Location < InputInlineQueryResult
          attribute :id, TD::Types::String
          attribute :location, TD::Types::Location
          attribute :live_period, TD::Types::Integer
          attribute :title, TD::Types::String
      Severity: Major
      Found in lib/tdlib/types/input_inline_query_result/location.rb and 4 other locations - About 1 hr to fix
      lib/tdlib/types/chat_member_status/administrator.rb on lines 18..28
      lib/tdlib/types/input_inline_query_result/animated_gif.rb on lines 15..25
      lib/tdlib/types/input_inline_query_result/animated_mpeg4.rb on lines 16..26
      lib/tdlib/types/input_inline_query_result/photo.rb on lines 14..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 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

      Method answer_inline_query has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        def answer_inline_query(inline_query_id, is_personal, results, cache_time, next_offset, switch_pm_text,
                                switch_pm_parameter)
      Severity: Major
      Found in lib/tdlib/client_methods.rb - About 50 mins to fix

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

          class IdentityDocument < Base
            attribute :number, TD::Types::String
            attribute :expiry_date, TD::Types::Date.optional.default(nil)
            attribute :front_side, TD::Types::DatedFile
            attribute :reverse_side, TD::Types::DatedFile
        Severity: Minor
        Found in lib/tdlib/types/identity_document.rb and 1 other location - About 50 mins to fix
        lib/tdlib/types/input_identity_document.rb on lines 11..17

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

        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 InputIdentityDocument < Base
            attribute :number, TD::Types::String
            attribute :expiry_date, TD::Types::Date.optional.default(nil)
            attribute :front_side, TD::Types::InputFile
            attribute :reverse_side, TD::Types::InputFile
        Severity: Minor
        Found in lib/tdlib/types/input_identity_document.rb and 1 other location - About 50 mins to fix
        lib/tdlib/types/identity_document.rb on lines 11..17

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

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

          def ready
            return dead_client_promise if dead?
            return Promises.fulfilled_future(self) if ready?
        
            Promises.future do
        Severity: Minor
        Found in lib/tdlib/client.rb - About 45 mins 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

          class UserFullInfo < Base
            attribute :is_blocked, TD::Types::Bool
            attribute :can_be_called, TD::Types::Bool
            attribute :has_private_calls, TD::Types::Bool
            attribute :bio, TD::Types::String
        Severity: Minor
        Found in lib/tdlib/types/user_full_info.rb and 1 other location - About 45 mins to fix
        lib/tdlib/types/game.rb on lines 12..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 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

        Severity
        Category
        Status
        Source
        Language