Class has too many lines. [177/100] Open
class RemoteDatasetTest < 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_gtdb_alt_taxonomy is too high. [29.15/15] 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
- 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. [23/10] 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)
- 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_ncbi_datasets_request is too high. [23.35/15] Open
def test_ncbi_datasets_request
rd = MiGA::RemoteDataset.new({ taxons: 'Bos' }, :genome, :ncbi_datasets)
u = rd.download_uri
h = rd.download_headers
p = rd.download_payload
- 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_ncbi_datasets_download_request is too high. [22.56/15] Open
def test_ncbi_datasets_download_request
# No remote access needed
rd = MiGA::RemoteDataset.new(
'GCF_004684205.1', :genome, :ncbi_datasets_download
)
- 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. [16/10] Open
def test_ncbi_datasets_download_request
# No remote access needed
rd = MiGA::RemoteDataset.new(
'GCF_004684205.1', :genome, :ncbi_datasets_download
)
- 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_gtdb_taxonomy is too high. [19.1/15] Open
def test_gtdb_taxonomy
declare_remote_access
rd = MiGA::RemoteDataset.new('GCA_018200315.1', :assembly, :gtdb)
md = rd.get_metadata
assert(!md[:is_type])
- 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. [13/10] Open
def test_ncbi_datasets_request
rd = MiGA::RemoteDataset.new({ taxons: 'Bos' }, :genome, :ncbi_datasets)
u = rd.download_uri
h = rd.download_headers
p = rd.download_payload
- 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_update_metadata is too high. [18.25/15] Open
def test_update_metadata
declare_remote_access
hiv1 = 'GCF_000856385.1'
d1 = MiGA::Dataset.new(project, 'd1')
assert_nil(d1.metadata[:ncbi_assembly])
- 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. [12/10] 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)
- 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_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
- 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_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
- 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_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)
- 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_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)
- 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
Add parentheses to nested method call u.is_a? URI
. Open
assert(u.is_a? URI)
- 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 md[:tax].is_a? MiGA::Taxonomy
. Open
assert(md[:tax].is_a? MiGA::Taxonomy)
- 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 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 md[:tax].is_a? MiGA::Taxonomy
. Open
assert(md[:tax].is_a? MiGA::Taxonomy)
- 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 u.is_a? URI
. Open
assert(u.is_a? URI)
- 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 md[:tax].alternative(1).is_a? MiGA::Taxonomy
. Open
assert(md[:tax].alternative(1).is_a? MiGA::Taxonomy)
- 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 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 u.is_a? URI
. Open
assert(u.is_a? URI)
- 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 u.is_a? URI
. Open
assert(u.is_a? URI)
- 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 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 p.is_a? String
. Open
assert(p.is_a? String)
- 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 md[:tax].alternative(:gtdb).is_a? MiGA::Taxonomy
. Open
assert(md[:tax].alternative(:gtdb).is_a? MiGA::Taxonomy)
- 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)