SpeciesFileGroup/taxonworks

View on GitHub
lib/utilities/geo.rb

Summary

Maintainability
F
6 days
Test Coverage

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

    def self.coordinates_regex_from_verbatim_label(text)
      return nil if text.blank?
      text = text.gsub("''", '"')
        .gsub('´´', '"')
        .gsub('ʹʹ', '"')
Severity: Minor
Found in lib/utilities/geo.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.

File geo.rb has 533 lines of code (exceeds 250 allowed). Consider refactoring.
Open

module Utilities
  # Special general routines for Geo-specific itams
  module Geo

    # !!
Severity: Major
Found in lib/utilities/geo.rb - About 1 day to fix

    Method coordinates_regex_from_verbatim_label has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
    Open

        def self.coordinates_regex_from_verbatim_label(text)
          return nil if text.blank?
          text = text.gsub("''", '"')
            .gsub('´´', '"')
            .gsub('ʹʹ', '"')
    Severity: Minor
    Found in lib/utilities/geo.rb - About 6 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 has too many lines. [54/25]
    Open

        def self.significant_digits(number_string)
          # is there a decimal point?
          intg = ''
          decimal_point_zeros = ''
          mantissa = ''
    Severity: Minor
    Found in lib/utilities/geo.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 coordinates_regex_from_verbatim_label has 108 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def self.coordinates_regex_from_verbatim_label(text)
          return nil if text.blank?
          text = text.gsub("''", '"')
            .gsub('´´', '"')
            .gsub('ʹʹ', '"')
    Severity: Major
    Found in lib/utilities/geo.rb - About 4 hrs to fix

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

          def self.conform_significant(number, sig_digits)
            input = significant_digits(number.to_s)
            input_string = input[0]
            intg = input[2]
            decimal_point = input[3]
      Severity: Minor
      Found in lib/utilities/geo.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 significant_digits has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

          def self.significant_digits(number_string)
            # is there a decimal point?
            intg = ''
            decimal_point_zeros = ''
            mantissa = ''
      Severity: Minor
      Found in lib/utilities/geo.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 conform_significant has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
      Open

          def self.conform_significant(number, sig_digits)
            input = significant_digits(number.to_s)
            input_string = input[0]
            intg = input[2]
            decimal_point = input[3]
      Severity: Minor
      Found in lib/utilities/geo.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 hunt_lat_long has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

          def self.hunt_lat_long(label, how = ' ')
            if how.nil?
              pieces = [label]
            else
              pieces = label.split(how)
      Severity: Minor
      Found in lib/utilities/geo.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 degrees_minutes_seconds_to_decimal_degrees has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
      Open

          def self.degrees_minutes_seconds_to_decimal_degrees(dms_in) # rubocop:disable Metrics/PerceivedComplexity !! But this is too complex :)
            match_string = nil
            # no_point     = false
            degrees      = 0.0
            minutes      = 0.0
      Severity: Minor
      Found in lib/utilities/geo.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 degrees_minutes_seconds_to_decimal_degrees has 56 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def self.degrees_minutes_seconds_to_decimal_degrees(dms_in) # rubocop:disable Metrics/PerceivedComplexity !! But this is too complex :)
            match_string = nil
            # no_point     = false
            degrees      = 0.0
            minutes      = 0.0
      Severity: Major
      Found in lib/utilities/geo.rb - About 2 hrs to fix

        Method significant_digits has 54 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def self.significant_digits(number_string)
              # is there a decimal point?
              intg = ''
              decimal_point_zeros = ''
              mantissa = ''
        Severity: Major
        Found in lib/utilities/geo.rb - About 2 hrs to fix

          Method conform_significant has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def self.conform_significant(number, sig_digits)
                input = significant_digits(number.to_s)
                input_string = input[0]
                intg = input[2]
                decimal_point = input[3]
          Severity: Minor
          Found in lib/utilities/geo.rb - About 1 hr to fix

            Method nearby_from_params has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def self.nearby_from_params(params)
                  nearby_distance = params['nearby_distance'].to_i
                  nearby_distance = CollectingEvent::NEARBY_DISTANCE if nearby_distance == 0
            
                  decade = case nearby_distance.to_s.length
            Severity: Minor
            Found in lib/utilities/geo.rb - About 1 hr to fix

              Method hunt_lat_long has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def self.hunt_lat_long(label, how = ' ')
                    if how.nil?
                      pieces = [label]
                    else
                      pieces = label.split(how)
              Severity: Minor
              Found in lib/utilities/geo.rb - About 1 hr to fix

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

                    def self.distance_in_meters(dist_in)
                      dist_in   = '0.0 meters' if dist_in.blank?
                      elevation = dist_in.strip.downcase
                      pieces    = elevation.split(' ')
                      # value     = elevation.to_f
                Severity: Minor
                Found in lib/utilities/geo.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 too many return statements within this method.
                Open

                      return {} if coordinates[:long_sec].to_f >= 60
                Severity: Major
                Found in lib/utilities/geo.rb - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                        return c
                  Severity: Major
                  Found in lib/utilities/geo.rb - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                          return {} if coordinates[:long_min].to_f >= 60
                    Severity: Major
                    Found in lib/utilities/geo.rb - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                            return {} if coordinates[:long_deg].to_f > 180 || coordinates[:long_deg].to_f < -180
                      Severity: Major
                      Found in lib/utilities/geo.rb - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                              return {} if coordinates[:lat_sec].to_f >= 60
                        Severity: Major
                        Found in lib/utilities/geo.rb - About 30 mins to fix

                          Avoid more than 3 levels of block nesting.
                          Open

                                      if intg.nil?
                                        intg = digits[0]
                                      end
                          Severity: Minor
                          Found in lib/utilities/geo.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 digit_string[index + 1].to_i >= 5
                                        result = (result.to_i + 1).to_s # round if necessary
                                      end
                          Severity: Minor
                          Found in lib/utilities/geo.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 decimal_position < sig_digits
                                        result.insert(decimal_position, decimal_point)
                                      end
                          Severity: Minor
                          Found in lib/utilities/geo.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 intg.length > 0  # have full case nn.mm
                                        sig = intg.length + mantissa.length
                                      else  # mantissa might have "leading" zeros
                                        decimal_lead_zeros = digits[1].length
                                        mantissa = digits[1].sub(/^[0]+/, '')
                          Severity: Minor
                          Found in lib/utilities/geo.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.

                          TODO found
                          Open

                              # TODO: move to /lib
                          Severity: Minor
                          Found in lib/utilities/geo.rb by fixme

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

                                if coordinates[:lat_ns].nil?
                                  lat_string = coordinates[:lat_deg]
                                  if coordinates[:lat_deg].to_f < 0 # -5° S; 5° N
                                    coordinates[:lat_ns] = 'S'
                                    coordinates[:lat_deg] = coordinates[:lat_deg].gsub('-', '')
                          Severity: Major
                          Found in lib/utilities/geo.rb and 1 other location - About 1 hr to fix
                          lib/utilities/geo.rb on lines 722..735

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 72.

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

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

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

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

                          Refactorings

                          Further Reading

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

                                if coordinates[:long_we].nil?
                                  long_string = coordinates[:long_deg]
                                  if coordinates[:long_deg].to_f < 0
                                    coordinates[:long_we] = 'W'
                                    coordinates[:long_deg] = coordinates[:long_deg].gsub('-', '')
                          Severity: Major
                          Found in lib/utilities/geo.rb and 1 other location - About 1 hr to fix
                          lib/utilities/geo.rb on lines 708..721

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 72.

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

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

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

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

                          Refactorings

                          Further Reading

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

                                  coordinates[:lat_deg] = matchdata2[2]
                                  coordinates[:lat_min] = matchdata2[3]
                                  coordinates[:lat_sec] = matchdata2[4]
                                  coordinates[:lat_ns]  = matchdata2[1]
                                  coordinates[:long_deg] = matchdata2[6]
                          Severity: Major
                          Found in lib/utilities/geo.rb and 1 other location - About 1 hr to fix
                          lib/utilities/geo.rb on lines 639..646

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 49.

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

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

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

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

                          Refactorings

                          Further Reading

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

                                  coordinates[:lat_deg] = matchdata1[1]
                                  coordinates[:lat_min] = matchdata1[2]
                                  coordinates[:lat_sec] = matchdata1[3]
                                  coordinates[:lat_ns]  = matchdata1[4]
                                  coordinates[:long_deg] = matchdata1[5]
                          Severity: Major
                          Found in lib/utilities/geo.rb and 1 other location - About 1 hr to fix
                          lib/utilities/geo.rb on lines 649..656

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 49.

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

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

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

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

                          Refactorings

                          Further Reading

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

                                  coordinates[:lat_deg] = matchdata3[2]
                                  coordinates[:lat_min] = matchdata3[3]
                                  coordinates[:lat_ns]  = matchdata3[1]
                                  coordinates[:long_deg] = matchdata3[5]
                                  coordinates[:long_min] = matchdata3[6]
                          Severity: Minor
                          Found in lib/utilities/geo.rb and 1 other location - About 40 mins to fix
                          lib/utilities/geo.rb on lines 667..672

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

                          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

                                  coordinates[:lat_deg] = matchdata4[1]
                                  coordinates[:lat_min] = matchdata4[2]
                                  coordinates[:lat_ns]  = matchdata4[3]
                                  coordinates[:long_deg] = matchdata4[4]
                                  coordinates[:long_min] = matchdata4[5]
                          Severity: Minor
                          Found in lib/utilities/geo.rb and 1 other location - About 40 mins to fix
                          lib/utilities/geo.rb on lines 659..664

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

                          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

                                  coordinates[:lat_deg] = matchdata6[1]
                                  coordinates[:lat_ns]  = matchdata6[2]
                                  coordinates[:long_deg] = matchdata6[3]
                                  coordinates[:long_we]  = matchdata6[4]
                          Severity: Minor
                          Found in lib/utilities/geo.rb and 1 other location - About 15 mins to fix
                          lib/utilities/geo.rb on lines 681..684

                          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

                                  coordinates[:lat_deg] = matchdata5[2]
                                  coordinates[:lat_ns]  = matchdata5[1]
                                  coordinates[:long_deg] = matchdata5[4]
                                  coordinates[:long_we]  = matchdata5[3]
                          Severity: Minor
                          Found in lib/utilities/geo.rb and 1 other location - About 15 mins to fix
                          lib/utilities/geo.rb on lines 675..678

                          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

                          Prefer symbols instead of strings as hash keys.
                          Open

                                'United States of America' => 'United States',
                          Severity: Minor
                          Found in lib/utilities/geo.rb by rubocop

                          This cop checks for the use of strings as keys in hashes. The use of symbols is preferred instead.

                          Example:

                          # bad
                          { 'one' => 1, 'two' => 2, 'three' => 3 }
                          
                          # good
                          { one: 1, two: 2, three: 3 }

                          There are no issues that match your filters.

                          Category
                          Status