matkoniecz/CartoCSSHelper

View on GitHub

Showing 69 of 77 total issues

Method visualise_for_location has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def self.visualise_for_location(latitude, longitude, zlevels, header, new_branch, old_branch, download_bbox_size = 0.4, image_size = 400)
Severity: Major
Found in lib/cartocss_helper/visualise_changes_image_generation.rb - About 1 hr to fix

    Method image_available_from_cache has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def self.image_available_from_cache(lat, lon, zlevel, bbox_size, image_size, export_filename, debug = false)
    Severity: Major
    Found in lib/cartocss_helper/renderer_handler.rb - About 50 mins to fix

      Method visualise_on_overpass_data has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def self.visualise_on_overpass_data(tags, type, wanted_latitude, wanted_longitude, zlevels, new_branch, old_branch = 'master')
      Severity: Major
      Found in lib/cartocss_helper/visualise_changes_image_generation.rb - About 50 mins to fix

        Method test_tag_on_real_data has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          def self.test_tag_on_real_data(tags, new_branch, old_branch, zlevels, types = ['node', 'closed_way', 'way'], min = 4, skip = 0)
        Severity: Major
        Found in lib/cartocss_helper.rb - About 50 mins to fix

          Method request_image_from_renderer has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def self.request_image_from_renderer(lat, lon, zlevel, bbox_size, image_size, export_filename, debug = false)
          Severity: Major
          Found in lib/cartocss_helper/renderer_handler.rb - About 50 mins to fix

            Method test_tag_on_real_data_for_this_type has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              def self.test_tag_on_real_data_for_this_type(tags, new_branch, old_branch, zlevels, type, min = 4, skip = 0)
            Severity: Major
            Found in lib/cartocss_helper.rb - About 50 mins to fix

              Method visualise_place_by_url has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                def self.visualise_place_by_url(url, zlevels, new_branch, old_branch = 'master', header = nil, download_bbox_size = 0.04, image_size = 350)
              Severity: Major
              Found in lib/cartocss_helper.rb - About 50 mins to fix

                Method magnacarto_command has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def self.magnacarto_command(lat, lon, zlevel, bbox_size, image_size, export_filename)
                Severity: Minor
                Found in lib/cartocss_helper/renderer_handler.rb - About 45 mins to fix

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

                      def self.turn_tag_into_overpass_filter(tag)
                        filter_data = translate_tag_object_into_filter_data(tag)
                        value = filter_data[:value]
                        key = filter_data[:key]
                        operator = filter_data[:operator]
                  Severity: Minor
                  Found in lib/cartocss_helper/overpass_query_generator.rb - About 45 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Method base_kosmtik_command has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def self.base_kosmtik_command(lat, lon, zlevel, bbox_size, image_size, export_filename, additional_params: '')
                  Severity: Minor
                  Found in lib/cartocss_helper/renderer_handler.rb - About 45 mins to fix

                    Method pack_image_sets has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def self.pack_image_sets(old, new, header, new_branch, old_branch, image_size)
                    Severity: Minor
                    Found in lib/cartocss_helper/visualise_changes_image_generation.rb - About 45 mins to fix

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

                          def check_dy(tags, zlevel, interactive = false, on_water = false)
                            unless is_object_displaying_anything_as_node tags, zlevel, on_water
                              # puts key+"="+value+" - not displayed as node on z#{zlevel}"
                              return
                            end
                      Severity: Minor
                      Found in lib/cartocss_helper/validator.rb - About 45 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Method find_data_pair has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def self.find_data_pair(tags_a, tags_b, latitude, longitude, type_a, type_b, bb_size: 0.1, distance_in_meters: 20, invalidate_cache: false)
                      Severity: Minor
                      Found in lib/cartocss_helper/overpass_query_generator.rb - About 45 mins to fix

                        Method probe has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          def self.probe(tags, new_branch, old_branch = 'master', zlevels = Configuration.get_min_z..Configuration.get_max_z, types = ['node', 'closed_way', 'way'], test_on_water = false)
                        Severity: Minor
                        Found in lib/cartocss_helper.rb - About 45 mins to fix

                          Method kosmtik_command has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def self.kosmtik_command(lat, lon, zlevel, bbox_size, image_size, export_filename)
                          Severity: Minor
                          Found in lib/cartocss_helper/renderer_handler.rb - About 45 mins to fix

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

                                def get_tags_from_mss_file(style_filename)
                                  possible_key_values = get_tags_from_osm2pqsql
                                  tags = Set.new
                                  # puts style_filename
                                  style_file = open(style_filename)
                            Severity: Minor
                            Found in lib/cartocss_helper/heuristic.rb - About 45 mins to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            Method test has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              def self.test(tags, new_branch, old_branch = 'master', zlevels = Configuration.get_min_z..Configuration.get_max_z, types = ['node', 'closed_way', 'way'], test_on_water = false)
                            Severity: Minor
                            Found in lib/cartocss_helper.rb - About 45 mins to fix

                              Method visualise_on_synthethic_data has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def self.visualise_on_synthethic_data(tags, type, on_water, zlevel_range, new_branch, old_branch)
                              Severity: Minor
                              Found in lib/cartocss_helper/visualise_changes_image_generation.rb - About 45 mins to fix

                                Method test_tag_on_sythetic_data has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                  def self.test_tag_on_sythetic_data(tags, new_branch, old_branch = 'master', zlevels = Configuration.get_min_z..Configuration.get_max_z, types = ['node', 'closed_way', 'way'], test_on_water = false)
                                Severity: Minor
                                Found in lib/cartocss_helper.rb - About 45 mins to fix

                                  Method tilemill_command has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def self.tilemill_command(lat, lon, zlevel, bbox_size, image_size, export_filename)
                                  Severity: Minor
                                  Found in lib/cartocss_helper/renderer_handler.rb - About 45 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language