Class has too many lines. [150/100] Open
class ProjectTest < 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_import_dataset is too high. [37.12/15] Open
def test_import_dataset
p1 = project
d = p1.add_dataset('d1')
File.open(
File.join(p1.path, 'data', '01.raw_reads', "#{d.name}.1.fastq"), 'w'
- 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. [27/10] Confirmed
def test_preprocessing
p1 = project
assert_predicate(p1, :done_preprocessing?)
d1 = p1.add_dataset('BAH')
assert_not_predicate(p1, :done_preprocessing?)
- 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_preprocessing is too high. [26.31/15] Open
def test_preprocessing
p1 = project
assert_predicate(p1, :done_preprocessing?)
d1 = p1.add_dataset('BAH')
assert_not_predicate(p1, :done_preprocessing?)
- 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. [20/10] Confirmed
def test_import_dataset
p1 = project
d = p1.add_dataset('d1')
File.open(
File.join(p1.path, 'data', '01.raw_reads', "#{d.name}.1.fastq"), 'w'
- 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. [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))
- 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_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)
- 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 test_preprocessing
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_preprocessing
p1 = project
assert_predicate(p1, :done_preprocessing?)
d1 = p1.add_dataset('BAH')
assert_not_predicate(p1, :done_preprocessing?)
- Create a ticketCreate a ticket
Add parentheses to nested method call MiGA::Project.DISTANCE_TASKS.is_a? Array
. Open
assert(MiGA::Project.DISTANCE_TASKS.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)
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 MiGA::Project.KNOWN_TYPES.is_a? Hash
. Open
assert(MiGA::Project.KNOWN_TYPES.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 MiGA::Project.INCLADE_TASKS.is_a? Array
. Open
assert(MiGA::Project.INCLADE_TASKS.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)