Class has too many lines. [117/100] Open
class ResultTest < Test::Unit::TestCase
include TestHelper
def setup
initialize_miga_home
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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_status is too high. [33.14/15] Open
def test_status
d = dataset
assert_equal(:ignore_empty, d.result_status(:trimmed_reads))
d.add_result(:trimmed_reads)
assert_equal(:-, d.result_status(:raw_reads))
- 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_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
Assignment Branch Condition size for test_result_source is too high. [29.07/15] Open
def test_result_source
r = dataset.add_result(:trimmed_reads)
assert_equal(dataset.name, r.source.name)
assert_equal(:trimmed_reads, r.key)
assert_equal('data/02.trimmed_reads', r.relative_dir)
- 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. [17/10] Open
def test_status
d = dataset
assert_equal(:ignore_empty, d.result_status(:trimmed_reads))
d.add_result(:trimmed_reads)
assert_equal(:-, d.result_status(:raw_reads))
- 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 test_versions is too high. [21.1/15] Open
def test_versions
r = dataset.add_result(:trimmed_reads)
assert_respond_to(r, :add_versions)
assert_respond_to(r, :versions_md)
assert_equal(MiGA::VERSION.join('.'), r.versions[:MiGA])
- 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. [15/10] 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 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. [15/10] 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 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_unlink is too high. [20.4/15] Open
def test_unlink
r = project.add_result(:clade_finding)
path = r.path
done = r.path(:done)
data = r.file_path(:empty)
- 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. [11/10] Open
def test_unlink
r = project.add_result(:clade_finding)
path = r.path
done = r.path(:done)
data = r.file_path(:empty)
- 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.
Missing magic comment # frozen_string_literal: true
. Open
require 'test_helper'
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Add parentheses to nested method call h.is_a? Hash
. Open
assert(h.is_a? Hash)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for unparenthesized method calls in the argument list of a parenthesized method call.
Example:
# good
method1(method2(arg), method3(arg))
# bad
method1(method2 arg, method3, arg)
Add parentheses to nested method call a.is_a? Array
. Open
assert(a.is_a? Array)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for unparenthesized method calls in the argument list of a parenthesized method call.
Example:
# good
method1(method2(arg), method3(arg))
# bad
method1(method2 arg, method3, arg)
Add parentheses to nested method call a[0].is_a? Array
. Open
assert(a[0].is_a? Array)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for unparenthesized method calls in the argument list of a parenthesized method call.
Example:
# good
method1(method2(arg), method3(arg))
# bad
method1(method2 arg, method3, arg)