CartoDB/cartodb20

View on GitHub
services/table-geocoder/lib/table_geocoder.rb

Summary

Maintainability
A
3 hrs
Test Coverage

Class TableGeocoder has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

  class TableGeocoder < AbstractTableGeocoder

    attr_reader   :working_dir, :csv_file, :result,
                  :max_rows, :cache

Severity: Minor
Found in services/table-geocoder/lib/table_geocoder.rb - About 2 hrs to fix

    Method run has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def run
          ensure_georef_status_colummn_valid
          @number_of_rows_pre_cache = calculate_number_of_rows
          cache.run unless cache_disabled?
          @csv_file = generate_csv()
    Severity: Minor
    Found in services/table-geocoder/lib/table_geocoder.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

    There are no issues that match your filters.

    Category
    Status