Showing 16 of 20 total issues
Class Archive
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
class Archive
def initialize(args)
@config = args[:config]
@name = args[:name]
Method select
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def select(query, opts = {})
has_more = true
next_token = nil
results = {}
- 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 all
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def all
regions = detected_regions
@logger.info "Querying regions #{regions.join(', ')} for Heirloom catalogs."
regions.each do |region|
@config.metadata_region = region
- 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 ensure_valid_options
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def ensure_valid_options(args)
provided = args[:provided]
required = args[:required]
config = args[:config]
logger = config.logger
- 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 select
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def select(query, opts = {})
has_more = true
next_token = nil
results = {}
Method start
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.start
cmd = ARGV.shift
case cmd
when 'authorize'
Method cleanup
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def cleanup(opts = {})
opts[:num_to_keep] ||= 100
opts[:remove_preserved] ||= false
num_cleaned = 0
- 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 all
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def all
regions = detected_regions
@logger.info "Querying regions #{regions.join(', ')} for Heirloom catalogs."
regions.each do |region|
@config.metadata_region = region
Method upload
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def upload
ensure_valid_metadata_region @config
ensure_domain_exists :name => @opts[:name],
:config => @config
ensure_buckets_exist :bucket_prefix => @bucket_prefix,
Method read_options
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def read_options
Trollop::options do
version Heirloom::VERSION
banner <<-EOS
Method read_options
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def read_options
Trollop::options do
version Heirloom::VERSION
banner <<-EOS
Method read_options
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def read_options
Trollop::options do
version Heirloom::VERSION
banner <<-EOS
Method read_options
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def read_options
Trollop::options do
version Heirloom::VERSION
banner <<-EOS
Method download
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def download(args)
@region = args[:region]
@bucket_prefix = args[:bucket_prefix]
@secret = args[:secret]
extract = args[:extract]
- 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 load_config
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def load_config(args)
opts = args[:opts]
logger = args[:logger]
config = Config.new :logger => logger, :environment => opts[:environment]
config.access_key = opts[:aws_access_key] if opts[:aws_access_key]
- 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 read_secret
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def read_secret(args)
opts = args[:opts]
config = args[:config]
logger = config.logger
- 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"