Showing 1,637 of 1,651 total issues
Assignment Branch Condition size for test_termination_file is too high. [15.13/15] Open
def test_termination_file
d = TestWithDaemon2.new(tmpdir)
assert { !d.termination_file?(nil) }
FileUtils.touch(d.terminate_file)
err = capture_stdout do
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for test_trimmed_fasta is too high. [15.3/15] Open
def test_trimmed_fasta
dir = 'data/04.trimmed_fasta'
fa = file_path(dir, '.CoupledReads.fa')
File.open(fa, 'w') { |fh| fh.puts '>1', 'ACTAC' }
touch_done(dir)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for test_debug_trace is too high. [15.13/15] Open
def test_debug_trace
assert_respond_to(MiGA::MiGA, :DEBUG)
assert_respond_to(MiGA::MiGA, :DEBUG_ON)
assert_respond_to(MiGA::MiGA, :DEBUG_OFF)
MiGA::MiGA.DEBUG_TRACE_ON
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for next_host is too high. [15.17/15] Open
def next_host
return jobs_running.size < maxjobs if runopts(:type) != 'ssh'
allk = (0..nodelist.size - 1).to_a
busyk = jobs_running.map { |k| k[:hostk] }
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for << is too high. [15.84/15] Open
def <<(value)
case value
when Hash
value.each do |r, n|
next if n.nil? || n == ''
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for add_dataset is too high. [15.17/15] Open
def add_dataset(name)
unless metadata[:datasets].include? name
d = MiGA::Dataset.new(self, name)
@metadata[:datasets] << name
@dataset_names_hash[name] = true if @dataset_names_hash
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for each_file is too high. [15.94/15] Open
def each_file(&blk)
return to_enum(:each_file) unless block_given?
@data[:files] ||= {}
self[:files].each do |k, files|
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for add_result_clade_finding is too high. [15.65/15] Open
def add_result_clade_finding(base, _opts)
if result_files_exist?(base, %w[.empty])
r = MiGA::Result.new("#{base}.json")
r.add_file(:empty, 'miga-project.empty')
return r
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for write_ncbi_list_json is too high. [15.3/15] Open
def write_ncbi_list_json(file, list)
cli.say "Saving remote list: #{file}"
File.open(file, 'w') do |fh|
fh.puts('# %i' % list.size)
kk = 0
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for finalize_tasks is too high. [15.17/15] Open
def finalize_tasks(d, downloaded)
cli.say "Datasets listed: #{d.size}"
act = cli[:dry] ? 'to download' : 'downloaded'
cli.say "Datasets #{act}: #{downloaded}"
unless cli[:remote_list].nil?
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for parse_cli is too high. [15.52/15] Open
def parse_cli
cli.defaults = {
query: false, unlink: false,
reference: false, add_version: true, dry: false,
get_md: false, only_md: false, save_every: 1
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for parse_cli is too high. [15.3/15] Open
def parse_cli
cli.defaults = { format: :json }
cli.parse do |opt|
cli.opt_object(opt, [:project])
opt.on(
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for discard_excluded is too high. [15.03/15] Open
def discard_excluded(ds)
unless cli[:exclude].nil?
cli.say "Discarding datasets in #{cli[:exclude]}"
File.readlines(cli[:exclude])
.select { |i| i !~ /^#/ }
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for add_file_to_tar is too high. [15.17/15] Open
def add_file_to_tar(tar, rel_path, abs_path)
if File.directory? abs_path
Dir["#{abs_path}/*"].each do |f|
add_file_to_tar(tar, File.join(rel_path, File.basename(f)), f)
end
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for check_mdfiles is too high. [15.43/15] Open
def check_mdfiles(cli)
cli.say 'Looking for unregistered files in the metadata folder'
md = File.join(cli.load_project.path, 'metadata')
Dir.each_child(md) do |file|
expected_ds = File.basename(file, '.json')
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for perform is too high. [15.03/15] Open
def perform
p = cli.load_project
create_empty_page(p)
generate_project_page(p)
cli.say 'Creating dataset pages'
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Block has too many lines. [41/25] Open
cli.parse do |opt|
cli.opt_object(opt, [:project, :dataset_opt])
cli.opt_filter_datasets(opt)
opt.on(
'-i', '--info',
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Assignment Branch Condition size for list_versions is too high. [15.03/15] Open
def list_versions(db)
return false unless cli[:list_versions]
cli.puts "# Database: #{cli[:database]}"
cli.puts ''
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for parse_cli is too high. [15.81/15] Open
def parse_cli
cli.defaults = { info: false, force: false, method: :hardlink }
cli.parse do |opt|
cli.opt_object(opt, [:project, :dataset_opt])
opt.on(
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for perform is too high. [15.17/15] Open
def perform
obj = cli.load_project_or_dataset
unless cli[:activate].nil?
cli.ensure_par(
{ dataset: '-D' },
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric