igorshapiro/quaker

View on GitHub

Showing 4 of 4 total issues

Method run has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def self.run
    Clamp do
      parameter "[SPEC_FILE]", "Extended docker-compose file"
      option %w(--tags -t), "TAGS", "Filter services (and dependencies) by tag", multivalued: true
      option %w(--dir -d), "DIR", "Specify base directory"
Severity: Minor
Found in lib/quaker.rb - About 1 hr to fix

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

        def resolve services_map
          for _, spec in services_map
            git_repo = spec.delete("git")
            next unless git_repo
    
    
    Severity: Minor
    Found in lib/quaker/git_resolver.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

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

        def filter services_map, tags_list, options = {}
          return services_map if !tags_list || tags_list.empty?
    
          include_tagged_services = !options[:only_deps]
    
    
    Severity: Minor
    Found in lib/quaker/tag_filter.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 dependencies has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        def dependencies services_map, name
          spec = services_map[name]
          raise MissingServiceError, name unless spec
    
          depends_on = spec["depends_on"] || []
    Severity: Minor
    Found in lib/quaker/tag_filter.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

    Severity
    Category
    Status
    Source
    Language