Showing 37 of 37 total issues
Method initialize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def initialize(args = {})
@br = args[:br] || false
@name = args[:name]
@condition = args[:condition]
@version = args[:version]
- Read upRead up
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 build_srpm
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def build_srpm
require 'awesome_spawn'
require_cmd! pkg_cmd
in_repo do
- Read upRead up
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 check_missing
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def check_missing
missing_deps.each { |name, deps|
latest = latest_alt(name)
print "#{name}(#{latest}) #{deps.collect { |dep| dep.requirement.to_s }}: ".blue.bold
- Read upRead up
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 distgit_state
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def distgit_state(args = {})
check_dep = args.key?(:check)
begin
distgit.clone
- Read upRead up
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 require_dep!
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def require_dep!(dep, obj=nil)
require dep
rescue LoadError => e
m = e.backtrace[obj.nil? ? 3 : 4].split.last
ms = obj.nil? ? m : "#{obj.class} #{m}"
- Read upRead up
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 set_targets
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def set_targets(conf)
targets = []
require 'polisher/adaptors/version_checker'
targets << :gem if conf[:check_gem]
targets << :koji if conf[:check_koji]
- Read upRead up
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 matches?
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def matches?(dep)
require 'gem2rpm'
return self == dep if dep.is_a?(self.class)
raise ArgumentError unless dep.is_a?(::Gem::Dependency)
- Read upRead up
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 waiting
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def waiting(args={})
waiting_msg(args[:msg]) if args.key?(:msg)
color = args[:color] || :black
@term_waiting = false
- Read upRead up
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 configure_targets
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def configure_targets(conf)
if conf[:check_koji]
require 'polisher/targets/koji'
Polisher::Koji.koji_url conf[:check_koji] if conf[:check_koji].is_a?(String)
Polisher::Koji.koji_tags conf[:koji_tags] if conf[:koji_tags]
- Read upRead up
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 dependency_tree
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def dependency_tree(args = {}, &bl)
local_args = Hash[args]
recursive = local_args[:recursive]
retrieve_dev_deps = local_args[:dev_deps]
matching = local_args[:matching]
- Read upRead up
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 known_versions_for
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.known_versions_for(name, &bl)
versions = {}
versions_for(name) do |tgt, _name, target_versions|
unless target_versions.include?(:unknown)
bl.call tgt, name, versions unless bl.nil?
- Read upRead up
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 :missing
Avoid too many return
statements within this method. Open
return :needs_update
Avoid too many return
statements within this method. Open
return :available if args[:check].match?(name, version)
Avoid too many return
statements within this method. Open
return :needs_build if state == :available
Method lookup
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def lookup(args={})
return unless fail_message args[:component],
args[:header] ||
args[:library] ||
args[:executable]
- Read upRead up
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 koji_state
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def koji_state(args = {})
check_dep = args.key?(:check)
return :missing if koji_tags.empty?
return :available unless check_dep
- Read upRead up
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"