bio-miga/miga

View on GitHub
test/tax_dist_test.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

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])
Severity: Minor
Found in test/tax_dist_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_aai_taxtest is too high. [26.31/15]
Open

  def test_aai_taxtest
    distant_intax = MiGA::TaxDist.aai_taxtest(35.0, :intax, engine: :diamond)
    assert_equal(:root, distant_intax[:most_likely][0])
    assert_equal(:d, distant_intax[:probably][0])
    assert_nil(distant_intax[:possibly_even])
Severity: Minor
Found in test/tax_dist_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_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])
Severity: Minor
Found in test/tax_dist_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. [12/10]
Open

  def test_aai_taxtest
    distant_intax = MiGA::TaxDist.aai_taxtest(35.0, :intax, engine: :diamond)
    assert_equal(:root, distant_intax[:most_likely][0])
    assert_equal(:d, distant_intax[:probably][0])
    assert_nil(distant_intax[:possibly_even])
Severity: Minor
Found in test/tax_dist_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.

Missing magic comment # frozen_string_literal: true.
Open

require 'test_helper'
Severity: Minor
Found in test/tax_dist_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