SpeciesFileGroup/taxonworks

View on GitHub
lib/interactive_key.rb

Summary

Maintainability
F
1 wk
Test Coverage

Method useful_descriptors has a Cognitive Complexity of 207 (exceeds 5 allowed). Consider refactoring.
Open

  def useful_descriptors
    list_of_remaining_taxa = {}
    language = @language_id.blank? ? nil : @language_id.to_i
    @row_hash.each do |r_key, r_value|
      if r_value[:status] != 'eliminated'
Severity: Minor
Found in lib/interactive_key.rb - About 4 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

Method has too many lines. [164/25]
Open

  def useful_descriptors
    list_of_remaining_taxa = {}
    language = @language_id.blank? ? nil : @language_id.to_i
    @row_hash.each do |r_key, r_value|
      if r_value[:status] != 'eliminated'
Severity: Minor
Found in lib/interactive_key.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Method remaining_taxa has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
Open

  def remaining_taxa
    #    @error_tolerance  - integer
    #    @eliminate_unknown  'true' or 'false'
    #    @descriptors_hash

Severity: Minor
Found in lib/interactive_key.rb - About 1 day 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 has too many lines. [68/25]
Open

  def remaining_taxa
    #    @error_tolerance  - integer
    #    @eliminate_unknown  'true' or 'false'
    #    @descriptors_hash

Severity: Minor
Found in lib/interactive_key.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Method useful_descriptors has 164 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def useful_descriptors
    list_of_remaining_taxa = {}
    language = @language_id.blank? ? nil : @language_id.to_i
    @row_hash.each do |r_key, r_value|
      if r_value[:status] != 'eliminated'
Severity: Major
Found in lib/interactive_key.rb - About 6 hrs to fix

    File interactive_key.rb has 433 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    class InteractiveKey
    
      ##### FILTER PARAMETERS #####
    
      # @!observation_matrix_id
    Severity: Minor
    Found in lib/interactive_key.rb - About 6 hrs to fix

      Method descriptors_hash_initiate has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
      Open

        def descriptors_hash_initiate
          h = {}
          descriptors_with_keywords.each do |d|
            h[d.id] = {}
            h[d.id][:descriptor] = d
      Severity: Minor
      Found in lib/interactive_key.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 remaining_taxa has 68 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def remaining_taxa
          #    @error_tolerance  - integer
          #    @eliminate_unknown  'true' or 'false'
          #    @descriptors_hash
      
      
      Severity: Major
      Found in lib/interactive_key.rb - About 2 hrs to fix

        Method has too many lines. [30/25]
        Open

          def initialize(
            observation_matrix_id: nil,
            project_id: nil,
            language_id: nil,
            keyword_ids: nil,
        Severity: Minor
        Found in lib/interactive_key.rb by rubocop

        This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

        Method has too many lines. [27/25]
        Open

          def descriptors_hash_initiate
            h = {}
            descriptors_with_keywords.each do |d|
              h[d.id] = {}
              h[d.id][:descriptor] = d
        Severity: Minor
        Found in lib/interactive_key.rb by rubocop

        This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

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

          def initialize(
            observation_matrix_id: nil,
            project_id: nil,
            language_id: nil,
            keyword_ids: nil,
        Severity: Minor
        Found in lib/interactive_key.rb - About 1 hr to fix

          Method descriptors_hash_initiate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def descriptors_hash_initiate
              h = {}
              descriptors_with_keywords.each do |d|
                h[d.id] = {}
                h[d.id][:descriptor] = d
          Severity: Minor
          Found in lib/interactive_key.rb - About 1 hr to fix

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

              def row_hash_initiate
                h = {}
                rows_with_filter.each do |r|
                  otu_collection_object = r.otu_id.to_s + '|' + r.collection_object_id.to_s
                  h[otu_collection_object] = {}
            Severity: Minor
            Found in lib/interactive_key.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

            Avoid deeply nested control flow statements.
            Open

                              d_value[:max] = o.sample_min if d_value[:max] < o.sample_min
            Severity: Major
            Found in lib/interactive_key.rb - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                d_value[:max] = o.sample_max if d_value[:max] < o.sample_max
              Severity: Major
              Found in lib/interactive_key.rb - About 45 mins to fix

                Consider simplifying this complex logical expression.
                Open

                              p = true if (d_min >= s_min && d_min <= s_max) || (d_max >= s_min && d_max <= s_max) || (d_min <= s_min && d_max >= s_max)
                Severity: Major
                Found in lib/interactive_key.rb - About 40 mins to fix

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

                    def selected_descriptors_hash_initiate
                      # "123:1|3||125:3|5||135:2"
                      h = {}
                      return h if @selected_descriptors.blank?
                      a = @selected_descriptors.include?('||') ? @selected_descriptors.to_s.split('||') : [@selected_descriptors]
                  Severity: Minor
                  Found in lib/interactive_key.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 eliminated_taxa has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def eliminated_taxa
                      h = {}
                      @row_hash.each do |r_key, r_value|
                        obj = r_value[:object_at_rank].class.to_s + '|' + r_value[:object_at_rank].id.to_s
                        if r_value[:status] == 'eliminated' && !@remaining.include?(r_value[:object_at_rank].class.to_s + '|' + r_value[:object_at_rank].id.to_s)
                  Severity: Minor
                  Found in lib/interactive_key.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

                  Avoid more than 3 levels of block nesting.
                  Open

                                  d_value[:min] = o.sample_min if d_value[:min] > o.sample_min
                  Severity: Minor
                  Found in lib/interactive_key.rb by rubocop

                  This cop checks for excessive nesting of conditional and looping constructs.

                  You can configure if blocks are considered using the CountBlocks option. When set to false (the default) blocks are not counted towards the nesting level. Set to true to count blocks as well.

                  The maximum level of nesting allowed is configurable.

                  Avoid more than 3 levels of block nesting.
                  Open

                                  d_value[:max] = o.continuous_value if d_value[:max] < o.continuous_value
                  Severity: Minor
                  Found in lib/interactive_key.rb by rubocop

                  This cop checks for excessive nesting of conditional and looping constructs.

                  You can configure if blocks are considered using the CountBlocks option. When set to false (the default) blocks are not counted towards the nesting level. Set to true to count blocks as well.

                  The maximum level of nesting allowed is configurable.

                  Avoid more than 3 levels of block nesting.
                  Open

                                  d_value[:min] = o.continuous_value if d_value[:min] > o.continuous_value
                  Severity: Minor
                  Found in lib/interactive_key.rb by rubocop

                  This cop checks for excessive nesting of conditional and looping constructs.

                  You can configure if blocks are considered using the CountBlocks option. When set to false (the default) blocks are not counted towards the nesting level. Set to true to count blocks as well.

                  The maximum level of nesting allowed is configurable.

                  Avoid more than 3 levels of block nesting.
                  Open

                                  if o.sample_max
                                    d_value[:max] = o.sample_max if d_value[:max] < o.sample_max
                                  else
                                    d_value[:max] = o.sample_min if d_value[:max] < o.sample_min
                                  end
                  Severity: Minor
                  Found in lib/interactive_key.rb by rubocop

                  This cop checks for excessive nesting of conditional and looping constructs.

                  You can configure if blocks are considered using the CountBlocks option. When set to false (the default) blocks are not counted towards the nesting level. Set to true to count blocks as well.

                  The maximum level of nesting allowed is configurable.

                  Use s_value[:o_max].present? instead of !s_value[:o_max].blank?.
                  Open

                              if descriptor[:status] != 'used' && (s_value[:o_min] != d_value[:min] || (!s_value[:o_max].blank? && s_value[:o_max] != d_value[:max]))
                  Severity: Minor
                  Found in lib/interactive_key.rb by rubocop

                  This cop checks for code that can be written with simpler conditionals using Object#present? defined by Active Support.

                  Interaction with Style/UnlessElse: The configuration of NotBlank will not produce an offense in the context of unless else if Style/UnlessElse is inabled. This is to prevent interference between the auto-correction of the two cops.

                  Example: NotNilAndNotEmpty: true (default)

                  # Converts usages of `!nil? && !empty?` to `present?`
                  
                  # bad
                  !foo.nil? && !foo.empty?
                  
                  # bad
                  foo != nil && !foo.empty?
                  
                  # good
                  foo.present?

                  Example: NotBlank: true (default)

                  # Converts usages of `!blank?` to `present?`
                  
                  # bad
                  !foo.blank?
                  
                  # bad
                  not foo.blank?
                  
                  # good
                  foo.present?

                  Example: UnlessBlank: true (default)

                  # Converts usages of `unless blank?` to `if present?`
                  
                  # bad
                  something unless foo.blank?
                  
                  # good
                  something if foo.present?

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

                                d_value[:state_ids][o.presence.to_s] = {} if d_value[:state_ids][o.presence.to_s].nil?
                                d_value[:state_ids][o.presence.to_s][:rows] = {} if d_value[:state_ids][o.presence.to_s][:rows].nil? ## rows which this state identifies
                                d_value[:state_ids][o.presence.to_s][:rows][ @row_hash[otu_collection_object][:object_at_rank] ] = true if @row_hash[otu_collection_object][:status] != 'eliminated'
                                if @selected_descriptors_hash[d_key] && @selected_descriptors_hash[d_key].include?(o.presence.to_s)
                                  d_value[:state_ids][o.presence.to_s][:status] = 'used' ## 'used', 'useful', 'useless'
                  Severity: Major
                  Found in lib/interactive_key.rb and 1 other location - About 2 hrs to fix
                  lib/interactive_key.rb on lines 449..456

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

                  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

                                d_value[:state_ids][o.character_state_id.to_s] = {} if d_value[:state_ids][o.character_state_id.to_s].nil?
                                d_value[:state_ids][o.character_state_id.to_s][:rows] = {} if d_value[:state_ids][o.character_state_id.to_s][:rows].nil? ## rows which this state identifies
                                d_value[:state_ids][o.character_state_id.to_s][:rows][ @row_hash[otu_collection_object][:object_at_rank] ] = true if @row_hash[otu_collection_object][:status] != 'eliminated'
                                if @selected_descriptors_hash[d_key] && @selected_descriptors_hash[d_key].include?(o.character_state_id.to_s)
                                  d_value[:state_ids][o.character_state_id.to_s][:status] = 'used' ## 'used', 'useful', 'useless'
                  Severity: Major
                  Found in lib/interactive_key.rb and 1 other location - About 2 hrs to fix
                  lib/interactive_key.rb on lines 459..466

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

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

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

                    def selected_descriptors_hash_initiate
                      # "123:1|3||125:3|5||135:2"
                      h = {}
                      return h if @selected_descriptors.blank?
                      a = @selected_descriptors.include?('||') ? @selected_descriptors.to_s.split('||') : [@selected_descriptors]
                  Severity: Major
                  Found in lib/interactive_key.rb and 1 other location - About 1 hr to fix
                  lib/image_matrix.rb on lines 300..309

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

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

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

                        if @identified_to_rank == 'otu'
                          h[otu_collection_object][:object_at_rank] = r.current_otu || r
                        elsif @identified_to_rank
                          h[otu_collection_object][:object_at_rank] = r&.current_taxon_name&.ancestor_at_rank(@identified_to_rank, inlude_self = true) || r
                        else
                  Severity: Minor
                  Found in lib/interactive_key.rb and 1 other location - About 35 mins to fix
                  lib/image_matrix.rb on lines 239..245

                  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

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

                    def language_to_use
                      return nil if @language_id.blank?
                      l = Language.where(id: @language_id).first
                      return nil if l.nil? || !descriptor_available_languages.to_a.include?(l)
                      l
                  Severity: Minor
                  Found in lib/interactive_key.rb and 1 other location - About 15 mins to fix
                  lib/image_matrix.rb on lines 176..180

                  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

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

                          h[obj] =
                              {object: r_value[:object_at_rank],
                               row_id: r_value[:object].id,
                               errors: r_value[:errors],
                               error_descriptors: r_value[:error_descriptors]
                  Severity: Minor
                  Found in lib/interactive_key.rb and 1 other location - About 15 mins to fix
                  lib/interactive_key.rb on lines 403..409

                  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

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

                        elsif h[obj].nil?
                            h[obj] =
                                {object: r_value[:object_at_rank],
                                 row_id: r_value[:object].id,
                                 errors: r_value[:errors],
                  Severity: Minor
                  Found in lib/interactive_key.rb and 1 other location - About 15 mins to fix
                  lib/interactive_key.rb on lines 420..425

                  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

                  Prefer single-quoted strings when you don't need string interpolation or special symbols.
                  Open

                          h[o.descriptor_id][:observation_hash][otu_collection_object] += ["%g" % o.continuous_value] if o.continuous_value
                  Severity: Minor
                  Found in lib/interactive_key.rb by rubocop

                  Checks if uses of quotes match the configured preference.

                  Example: EnforcedStyle: single_quotes (default)

                  # bad
                  "No special symbols"
                  "No string interpolation"
                  "Just text"
                  
                  # good
                  'No special symbols'
                  'No string interpolation'
                  'Just text'
                  "Wait! What's #{this}!"

                  Example: EnforcedStyle: double_quotes

                  # bad
                  'Just some text'
                  'No special chars or interpolation'
                  
                  # good
                  "Just some text"
                  "No special chars or interpolation"
                  "Every string in #{project} uses double_quotes"

                  Prefer single-quoted strings when you don't need string interpolation or special symbols.
                  Open

                                str = d_name + @descriptors_hash[d_key][:observations][otu_collection_object].collect{|o| "%g" % o.continuous_value}.join(' OR ')
                  Severity: Minor
                  Found in lib/interactive_key.rb by rubocop

                  Checks if uses of quotes match the configured preference.

                  Example: EnforcedStyle: single_quotes (default)

                  # bad
                  "No special symbols"
                  "No string interpolation"
                  "Just text"
                  
                  # good
                  'No special symbols'
                  'No string interpolation'
                  'Just text'
                  "Wait! What's #{this}!"

                  Example: EnforcedStyle: double_quotes

                  # bad
                  'Just some text'
                  'No special chars or interpolation'
                  
                  # good
                  "Just some text"
                  "No special chars or interpolation"
                  "Every string in #{project} uses double_quotes"

                  Prefer single-quoted strings when you don't need string interpolation or special symbols.
                  Open

                        descriptor[:min] = "%g" % descriptor[:min] if descriptor[:min]
                  Severity: Minor
                  Found in lib/interactive_key.rb by rubocop

                  Checks if uses of quotes match the configured preference.

                  Example: EnforcedStyle: single_quotes (default)

                  # bad
                  "No special symbols"
                  "No string interpolation"
                  "Just text"
                  
                  # good
                  'No special symbols'
                  'No string interpolation'
                  'Just text'
                  "Wait! What's #{this}!"

                  Example: EnforcedStyle: double_quotes

                  # bad
                  'Just some text'
                  'No special chars or interpolation'
                  
                  # good
                  "Just some text"
                  "No special chars or interpolation"
                  "Every string in #{project} uses double_quotes"

                  Prefer single-quoted strings when you don't need string interpolation or special symbols.
                  Open

                        descriptor[:max] = "%g" % descriptor[:max] if descriptor[:max]
                  Severity: Minor
                  Found in lib/interactive_key.rb by rubocop

                  Checks if uses of quotes match the configured preference.

                  Example: EnforcedStyle: single_quotes (default)

                  # bad
                  "No special symbols"
                  "No string interpolation"
                  "Just text"
                  
                  # good
                  'No special symbols'
                  'No string interpolation'
                  'Just text'
                  "Wait! What's #{this}!"

                  Example: EnforcedStyle: double_quotes

                  # bad
                  'Just some text'
                  'No special chars or interpolation'
                  
                  # good
                  "Just some text"
                  "No special chars or interpolation"
                  "Every string in #{project} uses double_quotes"

                  Use 2 (not 4) spaces for indentation.
                  Open

                            h[obj] =
                  Severity: Minor
                  Found in lib/interactive_key.rb by rubocop

                  This cop checks for indentation that doesn't use the specified number of spaces.

                  See also the IndentationConsistency cop which is the companion to this one.

                  Example:

                  # bad
                  class A
                   def test
                    puts 'hello'
                   end
                  end
                  
                  # good
                  class A
                    def test
                      puts 'hello'
                    end
                  end

                  Example: IgnoredPatterns: ['^\s*module']

                  # bad
                  module A
                  class B
                    def test
                    puts 'hello'
                    end
                  end
                  end
                  
                  # good
                  module A
                  class B
                    def test
                      puts 'hello'
                    end
                  end
                  end

                  There are no issues that match your filters.

                  Category
                  Status