Showing 1,586 of 1,600 total issues
Assignment Branch Condition size for query_probability_distributions is too high. [32.2/15] Open
def query_probability_distributions(d, cr)
cli.say 'Querying probability distributions'
tax = closest_relative_tax(cr)
if %w[intax both].include? cli[:test]
r = test_closest_relative(cr, tax, :intax)
- 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] Open
def check_db(cli)
cli.say 'Checking integrity of databases'
p = cli.load_project
n = p.dataset_names.size
(0 .. cli[:threads] - 1).map do |i|
- 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.
File daemon_test.rb
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'test_helper'
require 'daemon_helper'
require 'miga/daemon'
class DaemonTest < Test::Unit::TestCase
- Create a ticketCreate a ticket
Assignment Branch Condition size for test_reset is too high. [31.02/15] Open
def test_reset
tx = MiGA::Taxonomy.new(
'ns:Letters d:Latin s:A', nil,
['ns:Words d:English s:A', 'ns:Music d:Tone s:A']
)
- 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_overwrite_result is too high. [31.4/15] Open
def test_overwrite_result
r = dataset.add_result(:trimmed_reads)
r[:ephemeral] = '@'
r[:versions] = { you: 'best' }
r.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
Assignment Branch Condition size for test_aai_pvalues is too high. [31.4/15] Open
def test_aai_pvalues
distant_intax = MiGA::TaxDist.aai_pvalues(35.0, :intax)
assert_lt(distant_intax[:root], 0.05)
assert_gt(distant_intax[:g], 0.05)
assert_nil(distant_intax[:ns])
- 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_dates is too high. [31.26/15] Open
def test_dates
r = dataset.add_result(:trimmed_reads)
assert_nil(r.done_at)
assert_nil(r.started_at)
tf = File.join(
- 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. [26/10] Open
def test_check_datasets
p = project
d = daemon
d.runopts(:maxjobs, 0, true)
assert_empty(d.jobs_to_run)
- 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. [26/10] Open
def parse(path, opts = {})
opts = default_opts(opts)
# Read JSON
cont = 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. [26/10] Open
def add_metadata(obj, cli = self)
raise "Unsupported object: #{obj.class}" unless obj.respond_to? :metadata
(cli[:metadata] || '').split(',').each do |pair|
(k, v) = pair.split('=')
- 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 perform is too high. [31.21/15] Open
def perform
cli.ensure_par(index: '-i')
ds = cli.load_and_filter_datasets
cli.say 'Indexing taxonomy'
- 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 traverse_taxonomy is too high. [31.67/15] Open
def traverse_taxonomy(tab, dist)
cli.say 'Traversing taxonomy'
rank_i = 0
Taxonomy.KNOWN_RANKS.each do |rank|
next if rank == :ns
- 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 save_entry is too high. [31.4/15] Open
def save_entry(name, body, p)
cli.say " Locating remote dataset: #{name}"
body[:md][:metadata_only] = true if cli[:only_md]
rd = MiGA::RemoteDataset.new(body[:ids], body[:db], body[:universe])
if cli[:get_md]
- 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. [26/10] Open
def perform
unless cli[:value].nil?
cli.ensure_par(
{ key: '-k' },
'%<name>s is mandatory when --value is set: provide %<flag>s'
- 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 create_dataset is too high. [31.38/15] Open
def create_dataset(file, p)
name = cli[:dataset]
if name.nil?
ref_file = file.is_a?(Array) ? file.first : file
m = cli[:regexp].match(ref_file)
- 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. [26/10] Open
def get_files_and_type
files = cli.files
file_type = nil
if files.empty?
cli.ensure_par({ dataset: '-D' },
- 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 perform is too high. [31.46/15] Open
def perform
cli.ensure_type(MiGA::Project)
cli.ensure_par(project: '-P')
if !cli[:ignore_init] && !MiGA::MiGA.initialized?
raise 'MiGA has not been initialized, please use "miga init" first'
- 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. [26/10] Open
def parse_cli
cli.defaults = { units: false, tabular: false }
cli.parse do |opt|
cli.opt_object(opt, [:project, :dataset_opt])
cli.opt_filter_datasets(opt)
- 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. [26/10] Open
def perform
cli.ensure_par(result: '-r')
ds = cli.load_and_filter_datasets
cli.say 'Loading results'
k = 0
- 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_asm_get is too high. [31.92/15] Open
def ncbi_asm_get(opts)
require 'tempfile'
require 'zip'
zipped = download(
- 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