Showing 33 of 37 total issues
Method conf_attr
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def conf_attr(name, opts = {})
@conf_attrs ||= []
@conf_attrs << name
default = opts[:default]
accumulate = opts[:accumulate]
- 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 conf_source
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def conf_source
if conf[:gemname]
name = conf[:gemname]
if conf[:gemversion]
version = conf[:gemversion]
- 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 patched
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def patched
vendored.collect do |dep|
# TODO: right now just handling git based alternate sources,
# should be able to handle other types bundler supports
# (path and alternate rubygems src)
- 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 pretty_tgt
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def pretty_tgt(dep, tgt, versions)
pretty = ''
@last_dep ||= nil
if @last_dep != 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"
Further reading
Method targets_options
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def targets_options(option_parser)
option_parser.on('-p', '--prefix prefix', 'Prefix to append to gem name') do |p|
conf[:prefix] = p
end
Method conf_attr
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def conf_attr(name, opts = {})
@conf_attrs ||= []
@conf_attrs << name
default = opts[:default]
accumulate = opts[:accumulate]
Method check_missing_dep
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def check_missing_dep(dep)
dep_already_processed = missing_dep?(dep) # determine if this requirement was already recorded
gem_already_processed = missing_dep?(dep.name) # determine if previous requirement was not satified & recorded in deps
# even if current dep is not missing downstream we need to record all deps for gems with at least one missing 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"
Further reading
Method from
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def self.from(diff)
return diff.collect { |d| from(d) } if diff.is_a?(Array)
result = {}
- 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 pretty_dep
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def pretty_dep(gem, dep, resolved_dep)
pretty = ''
# XXX little bit hacky but works for now
@last_gem ||= 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
Method conf_source
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def conf_source
if conf[:gemname]
name = conf[:gemname]
if conf[:gemversion]
version = conf[:gemversion]
Method profiles
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def self.profiles(profiles=nil)
@profiles ||= []
[profiles].flatten.compact.each { |profile|
next unless conf_profiles[profile] && !@profiles.include?(profile)
- 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 diff
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def diff(other)
require_dep! 'awesome_spawn'
require_cmd! diff_cmd
out = 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
Method clone
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def clone
require_dep! 'awesome_spawn'
require_cmd! pkg_cmd
clobber!
- 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_versions
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def dependency_versions(args = {}, &bl)
versions = args[:versions] || {}
check_deps = args[:dev] ? dev_deps : deps
check_deps.each do |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"
Further reading
Method rpmize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def rpmize
require 'polisher/gem'
require 'polisher/rpm/spec'
matchers = Polisher::RPM::Spec::FILE_MACRO_MATCHERS
replacements = Polisher::RPM::Spec::FILE_MACRO_REPLACEMENTS.invert
- 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 each_file
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def each_file(&bl)
unpack do |dir|
Pathname.new(dir).find do |path|
next if path.to_s == dir.to_s
pathstr = path.to_s.gsub("#{dir}/", '')
- 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 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"