Showing 1,586 of 1,600 total issues
Assignment Branch Condition size for parse_cli is too high. [34.94/15] Open
def parse_cli
cli.defaults = { threads: 1 }
cli.defaults = Hash[@@OPERATIONS.keys.map { |i| [i, true] }]
cli.parse do |opt|
operation_n = Hash[@@OPERATIONS.map { |k, v| [v[0], k] }]
- 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
Method has too many lines. [29/10] Open
def get_sub_cli
return [cli] if cli[:file].nil? || cli[:ignore_file]
glob = []
cli_default = cli.original_argv + ['--ignore-file']
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method has too many lines. [29/10] Open
def check_software_requirements(rc_fh)
cli.puts 'Looking for requirements:'
opt_groups = {
mytaxa: 'MyTaxa',
rdp: 'RDP classifier',
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Block has too many lines. [67/25] Open
cli.parse do |opt|
cli.opt_object(opt, [:project, :dataset, :dataset_type])
opt.on(
'-I', '--ids ID1,ID2,...', Array,
'(Mandatory unless -F) IDs in the remote database separated by commas'
- 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 test_load_status is too high. [33.24/15] Open
def test_load_status
d1 = daemon
p1 = project
assert_equal(0, d1.jobs_running.size)
assert_nil(d1.load_status)
- 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_status is too high. [33.14/15] Open
def test_status
d = dataset
assert_equal(:ignore_empty, d.result_status(:trimmed_reads))
d.add_result(:trimmed_reads)
assert_equal(:-, d.result_status(:raw_reads))
- 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
Method has too many lines. [28/10] Confirmed
def get_type_status_ncbi_asm(metadata)
from_type = nil
# Try first from previously pulled NCBI metadata
if metadata[:ncbi_dataset]
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for clean_fasta_file is too high. [33.91/15] Open
def clean_fasta_file(file)
tmp_fh = nil
tmp_path = nil
begin
if file =~ /\.gz/
- 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
Method has too many lines. [28/10] Open
def cli_save_actions(opt)
cli.opt_flag(
opt, 'only-metadata',
'Create datasets without input data but retrieve all metadata',
:only_md
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for remote_list is too high. [33.78/15] Open
def remote_list
if cli[:ncbi_list_json] && File.size?(cli[:ncbi_list_json])
return read_ncbi_list_json(cli[:ncbi_list_json])
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
Method has too many lines. [28/10] Open
def merge_bidir_tmp(tmp)
dist = { aai: {}, ani: {} }
cli[:threads].times do |i|
cli.advance('Merging:', i + 1, cli[:threads], false)
file = File.join(tmp, "#{i}.json")
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method has too many lines. [28/10] Open
def check_mts(cli)
cli.say 'Looking for unarchived MyTaxa Scan runs'
cli.load_project.each_dataset do |d|
res = d.result(:mytaxa_scan)
next if res.nil?
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for partial_bidir_tmp is too high. [33.62/15] Open
def partial_bidir_tmp(project, ref_ds)
n = ref_ds.size
# Read data first (threaded)
tmp = File.join(project.path, 'doctor-bidirectional.tmp')
- 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
Method has too many lines. [28/10] Open
def opt_common(opt)
return unless @opt_common
if interactive
opt.on(
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for ncbi_gb_get is too high. [33.76/15] Open
def ncbi_gb_get(opts)
# Simply use defaults, but ensure that the URL can be properly formed
o = download_rest(opts.merge(universe: :ncbi, db: :nuccore))
return o unless o.strip.empty?
- 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_profile_advance is too high. [32.02/15] Open
def test_profile_advance
d2 = project.add_dataset('ds_profile_advance')
assert_equal(0, d2.profile_advance(true).first)
assert_equal(0, d2.profile_advance(true).last)
assert_equal(0, d2.profile_advance(true).inject(:+))
- 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
Method has too many lines. [27/10] Confirmed
def test_preprocessing
p1 = project
assert_predicate(p1, :done_preprocessing?)
d1 = p1.add_dataset('BAH')
assert_not_predicate(p1, :done_preprocessing?)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for test_dataset_clear_run_counts is too high. [32.14/15] Open
def test_dataset_clear_run_counts
dataset.metadata[:_try_something] = 1
dataset.metadata[:_step] = 'Boop'
dataset.metadata[:_not_a_counter] = 1
dataset.save
- 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
Method has too many lines. [27/10] Confirmed
def use_ncbi_taxonomy_dump(path, cli = nil)
raise "Directory doesn't exist: #{path}" unless File.directory?(path)
# Structure: { TaxID => ["name", "rank", parent TaxID] }
MiGA::MiGA.DEBUG "Loading NCBI Taxonomy dump: #{path}"
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method has too many lines. [27/10] Confirmed
def ncbi_asm_json_doc
return @_ncbi_asm_json_doc unless @_ncbi_asm_json_doc.nil?
if db == :assembly && %i[ncbi gtdb seqcode].include?(universe)
metadata[:ncbi_asm] ||= ids.first
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.