matkoniecz/CartoCSSHelper

View on GitHub
lib/cartocss_helper/visualise_changes_image_generation.rb

Summary

Maintainability
C
1 day
Test Coverage

Method add_job has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    def self.add_job(filename, latitude, longitude, zlevels, header, new_branch, old_branch, download_bbox_size, image_size, prefix)
      print prefix
      new_job = MapGenerationJob.new(filename, latitude, longitude, zlevels, header, new_branch, old_branch, download_bbox_size, image_size)
      new_job.print

Severity: Minor
Found in lib/cartocss_helper/visualise_changes_image_generation.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 add_job has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

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

    Method visualise_for_location_from_file has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def self.visualise_for_location_from_file(filename, 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 initialize has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

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

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

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

          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 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 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 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 collect_images_for_real_data_test has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def self.collect_images_for_real_data_test(latitude, longitude, zlevels, source, image_size = 400)
                  Severity: Minor
                  Found in lib/cartocss_helper/visualise_changes_image_generation.rb - About 35 mins to fix

                    There are no issues that match your filters.

                    Category
                    Status