bio-miga/miga

View on GitHub
test/result_stats_test.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Class has too many lines. [116/100]
Open

class ResultStatsTest < Test::Unit::TestCase
  include TestHelper

  def setup
    initialize_miga_home
Severity: Minor
Found in test/result_stats_test.rb by rubocop

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Assignment Branch Condition size for test_cds is too high. [29.27/15]
Open

  def test_cds
    # Prepare result
    dir = 'data/06.cds'
    fa = file_path(dir, '.faa')
    File.open(fa, 'w') { |fh| fh.puts '>1', 'M' }
Severity: Minor
Found in test/result_stats_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_taxonomy is too high. [26.08/15]
Open

  def test_taxonomy
    # Prepare result
    dir = 'data/09.distances/05.taxonomy'
    FileUtils.touch(file_path(dir, '.aai-medoids.tsv'))
    FileUtils.touch(file_path(dir, '.aai.db'))
Severity: Minor
Found in test/result_stats_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. [18/10]
Open

  def test_cds
    # Prepare result
    dir = 'data/06.cds'
    fa = file_path(dir, '.faa')
    File.open(fa, 'w') { |fh| fh.puts '>1', 'M' }
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_coupled_raw_reads is too high. [21.38/15]
Open

  def test_coupled_raw_reads
    dir = 'data/01.raw_reads'
    fq = file_path(dir, '.1.fastq')
    File.open(fq, 'w') { |fh| fh.puts '@1', 'ACTAC', '+', '####' }
    fq = file_path(dir, '.2.fastq')
Severity: Minor
Found in test/result_stats_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_single_raw_reads is too high. [20.22/15]
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 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. [15/10]
Open

  def test_taxonomy
    # Prepare result
    dir = 'data/09.distances/05.taxonomy'
    FileUtils.touch(file_path(dir, '.aai-medoids.tsv'))
    FileUtils.touch(file_path(dir, '.aai.db'))
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_assembly is too high. [18.25/15]
Open

  def test_assembly
    # Prepare result
    dir = 'data/05.assembly'
    fa = file_path(dir, '.LargeContigs.fna')
    File.open(fa, 'w') { |fh| fh.puts '>1', 'ACTAC' }
Severity: Minor
Found in test/result_stats_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. [12/10]
Open

  def test_coupled_raw_reads
    dir = 'data/01.raw_reads'
    fq = file_path(dir, '.1.fastq')
    File.open(fq, 'w') { |fh| fh.puts '@1', 'ACTAC', '+', '####' }
    fq = file_path(dir, '.2.fastq')
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.

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_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)
Severity: Minor
Found in test/result_stats_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

Missing magic comment # frozen_string_literal: true.
Open

require 'test_helper'
Severity: Minor
Found in test/result_stats_test.rb by rubocop

This cop is designed to help upgrade to Ruby 3.0. It will add the comment # frozen_string_literal: true to the top of files to enable frozen string literals. Frozen string literals may be default in Ruby 3.0. The comment will be added below a shebang and encoding comment. The frozen string literal comment is only valid in Ruby 2.3+.

Example: EnforcedStyle: when_needed (default)

# The `when_needed` style will add the frozen string literal comment
# to files only when the `TargetRubyVersion` is set to 2.3+.
# bad
module Foo
  # ...
end

# good
# frozen_string_literal: true

module Foo
  # ...
end

Example: EnforcedStyle: always

# The `always` style will always add the frozen string literal comment
# to a file, regardless of the Ruby version or if `freeze` or `<<` are
# called on a string literal.
# bad
module Bar
  # ...
end

# good
# frozen_string_literal: true

module Bar
  # ...
end

Example: EnforcedStyle: never

# The `never` will enforce that the frozen string literal comment does
# not exist in a file.
# bad
# frozen_string_literal: true

module Baz
  # ...
end

# good
module Baz
  # ...
end

There are no issues that match your filters.

Category
Status