redmine/redmine

View on GitHub
app/helpers/issues_helper.rb

Summary

Maintainability
F
1 wk
Test Coverage

Method show_detail has a Cognitive Complexity of 119 (exceeds 5 allowed). Consider refactoring.
Open

  def show_detail(detail, no_html=false, options={})
    multiple = false
    show_diff = false
    no_details = false

Severity: Minor
Found in app/helpers/issues_helper.rb - About 2 days 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

File issues_helper.rb has 663 lines of code (exceeds 250 allowed). Consider refactoring.
Open

module IssuesHelper
  include ApplicationHelper
  include Redmine::Export::PDF::IssuesPdfHelper
  include IssueStatusesHelper

Severity: Major
Found in app/helpers/issues_helper.rb - About 1 day to fix

    Method show_detail has 122 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def show_detail(detail, no_html=false, options={})
        multiple = false
        show_diff = false
        no_details = false
    
    
    Severity: Major
    Found in app/helpers/issues_helper.rb - About 4 hrs to fix

      Method details_to_strings has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

        def details_to_strings(details, no_html=false, options={})
          options[:only_path] = !(options[:only_path] == false)
          strings = []
          values_by_field = {}
          details.each do |detail|
      Severity: Minor
      Found in app/helpers/issues_helper.rb - About 3 hrs 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 issue_history_tabs has 54 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def issue_history_tabs
          tabs = []
          if @journals.present?
            has_details = @journals.any? {|value| value.details.present?}
            has_notes = @journals.any? {|value| value.notes.present?}
      Severity: Major
      Found in app/helpers/issues_helper.rb - About 2 hrs to fix

        Method email_issue_attributes has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

          def email_issue_attributes(issue, user, html)
            items = []
            %w(author status priority assigned_to category fixed_version start_date due_date parent_issue).each do |attribute|
              if issue.disabled_core_fields.grep(/^#{attribute}(_id)?$/).empty?
                attr_value = (issue.send attribute).to_s
        Severity: Minor
        Found in app/helpers/issues_helper.rb - About 2 hrs 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 render_issue_relations has 52 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def render_issue_relations(issue, relations)
            manage_relations = User.current.allowed_to?(:manage_issue_relations, issue.project)
            s = ''.html_safe
            relations.each do |relation|
              other_issue = relation.other_issue(issue)
        Severity: Major
        Found in app/helpers/issues_helper.rb - About 2 hrs to fix

          Method render_descendants_tree has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def render_descendants_tree(issue)
              manage_relations = User.current.allowed_to?(:manage_subtasks, issue.project)
              s = +'<table class="list issues odd-even">'
              issue_list(
                issue.descendants.visible.
          Severity: Major
          Found in app/helpers/issues_helper.rb - About 2 hrs to fix

            Method details_to_strings has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def details_to_strings(details, no_html=false, options={})
                options[:only_path] = !(options[:only_path] == false)
                strings = []
                values_by_field = {}
                details.each do |detail|
            Severity: Minor
            Found in app/helpers/issues_helper.rb - About 1 hr to fix

              Method issue_spent_hours_details has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                def issue_spent_hours_details(issue)
                  if issue.total_spent_hours > 0
                    path = project_time_entries_path(issue.project, :issue_id => "~#{issue.id}")
              
                    if issue.total_spent_hours == issue.spent_hours
              Severity: Minor
              Found in app/helpers/issues_helper.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

              Method render_issues_stats has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def render_issues_stats(open_issues=0, closed_issues=0, issues_path_attr={})
                  total_issues = open_issues + closed_issues
                  return if total_issues == 0
              
                  all_block = content_tag(
              Severity: Minor
              Found in app/helpers/issues_helper.rb - About 1 hr to fix

                Method projects_for_select has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                  def projects_for_select(issue)
                    projects =
                      if issue.parent_issue_id.present?
                        issue.allowed_target_projects_for_subtask(User.current)
                      elsif @project && issue.new_record? && !issue.copy?
                Severity: Minor
                Found in app/helpers/issues_helper.rb - About 55 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

                Avoid deeply nested control flow statements.
                Open

                            (no_html ? rel_issue : link_to_issue(rel_issue, :only_path => options[:only_path]))
                Severity: Major
                Found in app/helpers/issues_helper.rb - About 45 mins to fix

                  Method render_descendants_tree has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def render_descendants_tree(issue)
                      manage_relations = User.current.allowed_to?(:manage_subtasks, issue.project)
                      s = +'<table class="list issues odd-even">'
                      issue_list(
                        issue.descendants.visible.
                  Severity: Minor
                  Found in app/helpers/issues_helper.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

                  Method issue_estimated_hours_details has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def issue_estimated_hours_details(issue)
                      if issue.total_estimated_hours.present?
                        if issue.total_estimated_hours == issue.estimated_hours
                          l_hours_short(issue.estimated_hours)
                        else
                  Severity: Minor
                  Found in app/helpers/issues_helper.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

                  Method issue_history_tabs has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def issue_history_tabs
                      tabs = []
                      if @journals.present?
                        has_details = @journals.any? {|value| value.details.present?}
                        has_notes = @journals.any? {|value| value.notes.present?}
                  Severity: Minor
                  Found in app/helpers/issues_helper.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

                  Method render_issue_tooltip has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def render_issue_tooltip(issue)
                      @cached_label_status ||= l(:field_status)
                      @cached_label_start_date ||= l(:field_start_date)
                      @cached_label_due_date ||= l(:field_due_date)
                      @cached_label_assigned_to ||= l(:field_assigned_to)
                  Severity: Minor
                  Found in app/helpers/issues_helper.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

                  Method render_api_issue_children has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def render_api_issue_children(issue, api)
                      return if issue.leaf?
                  
                      api.array :children do
                        issue.children.each do |child|
                  Severity: Minor
                  Found in app/helpers/issues_helper.rb - About 35 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

                  Method render_issue_relations has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def render_issue_relations(issue, relations)
                      manage_relations = User.current.allowed_to?(:manage_issue_relations, issue.project)
                      s = ''.html_safe
                      relations.each do |relation|
                        other_issue = relation.other_issue(issue)
                  Severity: Minor
                  Found in app/helpers/issues_helper.rb - About 25 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

                  Method issue_list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def issue_list(issues, &block)
                      ancestors = []
                      issues.each do |issue|
                        while ancestors.any? &&
                              !issue.is_descendant_of?(ancestors.last)
                  Severity: Minor
                  Found in app/helpers/issues_helper.rb - About 25 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

                  Method grouped_issue_list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def grouped_issue_list(issues, query, &block)
                      ancestors = []
                      grouped_query_results(issues, query) do |issue, group_name, group_count, group_totals|
                        while ancestors.any? &&
                              !issue.is_descendant_of?(ancestors.last)
                  Severity: Minor
                  Found in app/helpers/issues_helper.rb - About 25 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

                    def grouped_issue_list(issues, query, &block)
                      ancestors = []
                      grouped_query_results(issues, query) do |issue, group_name, group_count, group_totals|
                        while ancestors.any? &&
                              !issue.is_descendant_of?(ancestors.last)
                  Severity: Minor
                  Found in app/helpers/issues_helper.rb and 1 other location - About 35 mins to fix
                  app/helpers/projects_helper.rb on lines 197..202

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

                  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

                          rel_issue = Issue.visible.find_by_id(detail.value)
                          value =
                            if rel_issue.nil?
                              "#{l(:label_issue)} ##{detail.value}"
                            else
                  Severity: Minor
                  Found in app/helpers/issues_helper.rb and 1 other location - About 25 mins to fix
                  app/helpers/issues_helper.rb on lines 591..596

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

                  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

                          rel_issue = Issue.visible.find_by_id(detail.old_value)
                          old_value =
                            if rel_issue.nil?
                              "#{l(:label_issue)} ##{detail.old_value}"
                            else
                  Severity: Minor
                  Found in app/helpers/issues_helper.rb and 1 other location - About 25 mins to fix
                  app/helpers/issues_helper.rb on lines 583..588

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

                  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

                        tabs <<
                          {
                            :name => 'changesets',
                            :label => :label_associated_revisions,
                            :remote => true,
                  Severity: Minor
                  Found in app/helpers/issues_helper.rb and 1 other location - About 15 mins to fix
                  app/helpers/issues_helper.rb on lines 726..734

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

                  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

                        tabs <<
                          {
                            :name => 'time_entries',
                            :label => :label_time_entry_plural,
                            :remote => true,
                  Severity: Minor
                  Found in app/helpers/issues_helper.rb and 1 other location - About 15 mins to fix
                  app/helpers/issues_helper.rb on lines 738..746

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

                  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 changes[:added].any?
                            detail = MultipleValuesDetail.new('cf', field.id.to_s, field)
                            detail.value = changes[:added]
                            strings << show_detail(detail, no_html, options)
                  Severity: Minor
                  Found in app/helpers/issues_helper.rb and 1 other location - About 15 mins to fix
                  app/helpers/issues_helper.rb on lines 513..516

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

                  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 changes[:deleted].any?
                            detail = MultipleValuesDetail.new('cf', field.id.to_s, field)
                            detail.old_value = changes[:deleted]
                            strings << show_detail(detail, no_html, options)
                  Severity: Minor
                  Found in app/helpers/issues_helper.rb and 1 other location - About 15 mins to fix
                  app/helpers/issues_helper.rb on lines 508..511

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

                  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

                  There are no issues that match your filters.

                  Category
                  Status