bio-miga/miga

View on GitHub

Showing 838 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
Severity: Minor
Found in test/with_daemon_test.rb by rubocop

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
Severity: Minor
Found in test/common_test.rb by rubocop

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] }
Severity: Minor
Found in lib/miga/daemon.rb by rubocop

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
Severity: Minor
Found in lib/miga/project/dataset.rb by rubocop

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 == ''
Severity: Minor
Found in lib/miga/taxonomy.rb by rubocop

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|
Severity: Minor
Found in lib/miga/result.rb by rubocop

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
Severity: Minor
Found in lib/miga/project/result.rb by rubocop

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
Severity: Minor
Found in lib/miga/cli/action/gtdb_get.rb by rubocop

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?

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

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 !~ /^#/ }

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(
Severity: Minor
Found in lib/miga/cli/action/tax_index.rb by rubocop

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')

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
Severity: Minor
Found in lib/miga/cli/action/archive.rb by rubocop

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'
Severity: Minor
Found in lib/miga/cli/action/browse.rb by rubocop

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',
Severity: Minor
Found in lib/miga/cli/action/ls.rb by rubocop

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 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(
Severity: Minor
Found in lib/miga/cli/action/ln.rb by rubocop

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|
      opt.on(
        '-n', '--database STRING',
        "Name of the database to download. By default: #{cli[:database]}"
      ) { |v| cli[:database] = v.to_sym }
Severity: Minor
Found in lib/miga/cli/action/db.rb by rubocop

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.

Block has too many lines. [41/25]
Open

    cli.parse do |opt|
      opt.on(
        '-c', '--config PATH',
        'Path to the Bash configuration file',
        "By default: #{cli[:config]}"
Severity: Minor
Found in lib/miga/cli/action/init.rb by rubocop

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 ''
Severity: Minor
Found in lib/miga/cli/action/db.rb by rubocop

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

Severity
Category
Status
Source
Language