SysMO-DB/seek

View on GitHub

Showing 1,025 of 1,025 total issues

Function updateRoles has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function updateRoles(editable,group_id) {

    role_ids=new Array();
    role_text=""

Severity: Minor
Found in app/assets/javascripts/people.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 image_tag_for_key has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

  def image_tag_for_key(key, url=nil, alt=nil, html_options={}, label=key.humanize, remote=false, size=nil)

    label = 'Delete' if label == 'Destroy'
    
    return nil unless (filename = icon_filename_for_key(key.downcase))
Severity: Minor
Found in app/helpers/images_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 work_group_groups_for_selection has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

  def work_group_groups_for_selection(person)
    options = []
    last_project=nil
    #if current_user is project manager and not admin, load work_groups of projects he is in
    if project_manager_logged_in? && !admin_logged_in? && !Seek::Config.is_virtualliver
Severity: Minor
Found in app/helpers/work_groups_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 create has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

  def create
    unless params[:avatar].blank? || params[:avatar][:image_file].blank?
      file_specified = true
      
      # the creation of the new Avatar instance needs to have only one parameter - therefore, the rest should be set separately
Severity: Minor
Found in app/controllers/avatars_controller.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 get_and_process_file has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

  def get_and_process_file from_url=true,from_jerm=false
    if from_url
      data_hash = get_data_hash_from_url
      #delete the previous conversion to refresh, but only if a copy of the original exists
      pdf_path = @content_blob.filepath("pdf")
Severity: Minor
Found in app/controllers/content_blobs_controller.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 create has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

   def create
       unless params[:model_image].blank? || params[:model_image][:image_file].blank?
         file_specified = true
         @model_image = ModelImage.new params[:model_image]
         @model_image.model_id = params[:model_id]
Severity: Minor
Found in app/controllers/model_images_controller.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 all_authorized_for has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

        def all_authorized_for action, user=User.current_user, projects=nil, filter_by_permissions=true
          projects=Array(projects) unless projects.nil?
          user_id = user.nil? ? 0 : user.id
          assets = []
          programatic_project_filter = !projects.nil? && (!Seek::Config.auth_lookup_enabled || (self==Assay || self==Study))
Severity: Minor
Found in lib/seek/permissions/policy_based_authorization.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 project_membership_required has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

  def project_membership_required
    unless User.logged_in_and_member? || User.admin_logged_in?
      flash[:error] = "Only members of known projects, institutions or work groups are allowed to create new content."
      respond_to do |format|
        format.html do          
Severity: Minor
Found in app/controllers/application_controller.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 build_assay_mock_json has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    def build_assay_mock_json sheet

      if @assay_mapping[:parsing_direction] == "horizontal"
        mapped_field_hunter = method(:hunt_for_horizontal_field_value_mapped)
      else
Severity: Minor
Found in lib/seek/data/bio_samples.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 8 locations. Consider refactoring.
Open

  this.SetMinHeight = function(value)
  {
    value = parseInt(value);
    if(isNaN(value) || value < MINSIZE)
      value = MINSIZE;
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 499..509
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 511..521
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 546..556
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 509..519
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 521..531
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 544..554
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 556..566

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

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

  this.SetMaxWidth = function(value)
  {
    value = parseInt(value);
    if(isNaN(value) || value < MINSIZE)
      value = MINSIZE;
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 499..509
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 534..544
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 546..556
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 509..519
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 521..531
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 544..554
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 556..566

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

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

  this.SetMaxHeight = function(value)
  {
    value = parseInt(value);
    if(isNaN(value) || value < MINSIZE)
      value = MINSIZE;
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 499..509
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 511..521
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 534..544
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 546..556
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 509..519
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 521..531
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 544..554

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

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

    def build_all_bio_sample_json sheet

      # population order should NOT change, DB is populated only if @to_populate is set to be true

      # probing number of rows with data in sheet
Severity: Minor
Found in lib/seek/data/bio_samples.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 8 locations. Consider refactoring.
Open

  this.SetMinWidth = function(value)
  {
    value = parseInt(value);
    if(isNaN(value) || value < MINSIZE)
      value = MINSIZE;
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 511..521
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 534..544
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 546..556
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 509..519
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 521..531
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 544..554
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 556..566

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

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

    def paginate(*args)
      options=args.pop unless args.nil?
      options ||= {}                

      default_page = options[:default_page] || @default_page
Severity: Minor
Found in lib/grouped_pagination.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 8 locations. Consider refactoring.
Open

  this.SetMaxHeight = function(value)
  {
    value = parseInt(value);
    if(isNaN(value) || value < MINSIZE)
      value = MINSIZE;
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 499..509
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 511..521
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 534..544
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 509..519
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 521..531
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 544..554
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 556..566

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

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

  this.SetMinHeight = function(value)
  {
    value = parseInt(value);
    if(isNaN(value) || value < MINSIZE)
      value = MINSIZE;
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 499..509
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 511..521
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 534..544
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 546..556
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 509..519
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 521..531
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 556..566

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

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

  this.SetMinWidth = function(value)
  {
    value = parseInt(value);
    if(isNaN(value) || value < MINSIZE)
      value = MINSIZE;
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 499..509
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 511..521
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 534..544
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 546..556
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 521..531
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 544..554
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 556..566

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

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

        def destroy_version(version_number)
          if (ver = find_version(version_number))
            without_update_callbacks do
              # For fault tolerance (ie: to prevent data loss through premature deletion), first...
              # Check to see if the current (aka latest) version has to be deleted,
Severity: Minor
Found in lib/explicit_versioning.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 8 locations. Consider refactoring.
Open

  this.SetMaxWidth = function(value)
  {
    value = parseInt(value);
    if(isNaN(value) || value < MINSIZE)
      value = MINSIZE;
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 499..509
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 511..521
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 534..544
app/assets/javascripts/jws/Resizeable_Container/javascript.js on lines 546..556
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 509..519
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 544..554
app/assets/javascripts/jws/Resizeable_Textbox/javascript.js on lines 556..566

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

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