bio-miga/miga

View on GitHub

Showing 839 of 1,651 total issues

Method has too many lines. [12/10]
Open

  def add_result_trimmed_reads(base, _opts)
    return nil unless result_files_exist?(base, '.1.clipped.fastq')

    add_files_to_ds_result(
      MiGA::Result.new("#{base}.json"), name,
Severity: Minor
Found in lib/miga/dataset/result/add.rb by rubocop

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 compute_stats_ssu has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def compute_stats_ssu
    stats = {
      ssu: 0, complete_ssu: 0, ssu_fragment: [0.0, '%'],
      lsu: 0, complete_lsu: 0, lsu_fragment: [0.0, '%']
    }
Severity: Minor
Found in lib/miga/result/stats.rb - About 1 hr to fix

Method opt_object has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def opt_object(opt, what = %i[project dataset])
    what.each do |w|
      case w
      when :project
        opt.on(
Severity: Minor
Found in lib/miga/cli/opt_helper.rb - About 1 hr to fix

Assignment Branch Condition size for test_datasets is too high. [16.28/15]
Open

  def test_datasets
    p = project
    d = dataset(0, 'd1')
    assert_equal(MiGA::Dataset, d.class)
    assert_equal([d], p.datasets)
Severity: Minor
Found in test/project_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

Method has too many lines. [11/10]
Open

  def test_download_file_ftp
    declare_remote_access
    f = tmpfile('t/test.txt')
    d = File.dirname(f)
    assert(!Dir.exist?(d))
Severity: Minor
Found in test/net_test.rb by rubocop

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_net_ftp is too high. [16.49/15]
Open

  def test_net_ftp
    cjac = 'ftp://ftp.ebi.ac.uk/pub/databases/ena/tsa/' \
           'public/gap/GAPJ01.fasta.gz'
    n = 'Cjac_L14'
    rd = MiGA::RemoteDataset.new(cjac, :assembly_gz, :web)
Severity: Minor
Found in test/remote_dataset_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

Method has too many lines. [11/10]
Open

  def test_single_raw_reads
    dir = 'data/01.raw_reads'
    fq = file_path(dir, '.1.fastq')
    File.open(fq, 'w') { |fh| fh.puts '@1', 'ACTAC', '+', '####' }
    touch_done(dir)
Severity: Minor
Found in test/result_stats_test.rb by rubocop

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_save is too high. [16.12/15]
Open

  def test_save
    d2 = project.add_dataset('ds_save')
    assert_respond_to(d2, :save)
    d2.save
    assert_not_predicate(d2, :multi?)
Severity: Minor
Found in test/dataset_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_declare_alive_loop is too high. [16.28/15]
Open

  def test_declare_alive_loop
    d = TestWithDaemon.new(tmpfile('nope'))
    assert_equal(:no_home, d.declare_alive_loop)

    d = TestWithDaemon.new(tmpdir)
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_gtdb_request is too high. [16.28/15]
Open

  def test_gtdb_request
    # No remote access needed
    rd = MiGA::RemoteDataset.new('g__Macondimonas', :taxon, :gtdb)
    u = rd.download_uri
    h = rd.download_headers
Severity: Minor
Found in test/remote_dataset_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

Method has too many lines. [11/10]
Open

  def test_save
    d2 = project.add_dataset('ds_save')
    assert_respond_to(d2, :save)
    d2.save
    assert_not_predicate(d2, :multi?)
Severity: Minor
Found in test/dataset_test.rb by rubocop

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. [11/10]
Open

  def test_add_result
    d2 = project.add_dataset('ds_add_result')
    assert_nil(d2.add_result(:koop))
    assert_nil(d2.add_result(:raw_reads))
    FileUtils.touch(
Severity: Minor
Found in test/dataset_test.rb by rubocop

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_get is too high. [16.49/15]
Open

  def test_get
    hiv2 = 'M30502.1'
    { embl: :ebi, nuccore: :ncbi }.each do |db, universe|
      rd = MiGA::RemoteDataset.new(hiv2, db, universe)
      assert_equal([hiv2], rd.ids)
Severity: Minor
Found in test/remote_dataset_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

Method has too many lines. [11/10]
Open

  def test_gtdb_alt_taxonomy
    declare_remote_access
    rd = MiGA::RemoteDataset.new('GCA_018200315.1', :assembly, :gtdb)
    rd.metadata[:get_ncbi_taxonomy] = true
    md = rd.get_metadata
Severity: Minor
Found in test/remote_dataset_test.rb by rubocop

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. [11/10]
Open

  def test_activate
    d = dataset
    assert_equal(:incomplete, d.status)
    assert_predicate(d, :active?)
    d.inactivate! 'Too annoying'
Severity: Minor
Found in test/dataset_test.rb by rubocop

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. [11/10]
Confirmed

  def test_add_result
    p1 = project
    assert_nil(p1.add_result(:doom))
    %w[.rds .log .txt .done].each do |x|
      assert_nil(p1.add_result(:haai_distances))
Severity: Minor
Found in test/project_test.rb by rubocop

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. [11/10]
Open

  def parse(&fun)
    if expect_operation
      @operation = @argv.shift unless argv.first =~ /^-/
    end
    OptionParser.new do |opt|
Severity: Minor
Found in lib/miga/cli.rb by rubocop

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_each_project is too high. [16.28/15]
Open

  def test_each_project
    lair = MiGA::Lair.new(tmpdir)
    y = []
    lair.each_project { |p| y << p }
    assert_equal(3, y.size)
Severity: Minor
Found in test/lair_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

Method has too many lines. [11/10]
Open

  def setup
    initialize_miga_home(
      <<~DAEMON
        { "maxjobs": 1, "ppn": 1, "latency": 1, "varsep": " ",
          "var": "{{key}}={{value}}", "cmd": "echo {{task_name}} >/dev/null",
Severity: Minor
Found in test/lair_test.rb by rubocop

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. [11/10]
Open

  def test_dataset_clear_run_counts
    dataset.metadata[:_try_something] = 1
    dataset.metadata[:_step] = 'Boop'
    dataset.metadata[:_not_a_counter] = 1
    dataset.save
Severity: Minor
Found in test/hook_test.rb by rubocop

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.

Severity
Category
Status
Source
Language