yannickwurm/sequenceserver

View on GitHub
lib/sequenceserver/blast/hit.rb

Summary

Maintainability
A
0 mins
Test Coverage

Do not use semicolons to terminate expressions.
Open

        properties.inject({}) { |h, k| h[k] = send(k); h }.to_json(*args)
Severity: Minor
Found in lib/sequenceserver/blast/hit.rb by rubocop

This cop checks for multiple expressions placed on the same line. It also checks for lines terminated with a semicolon.

This cop has AllowAsExpressionSeparator configuration option. It allows ; to separate several expressions on the same line.

Example:

# bad
foo = 1; bar = 2;
baz = 3;

# good
foo = 1
bar = 2
baz = 3

Example: AllowAsExpressionSeparator: false (default)

# bad
foo = 1; bar = 2

Example: AllowAsExpressionSeparator: true

# good
foo = 1; bar = 2

:length member overrides Struct#length and it may be unexpected.
Open

                     :length, :sciname, :qcovs, :hsps) do
Severity: Minor
Found in lib/sequenceserver/blast/hit.rb by rubocop

This cop checks unexpected overrides of the Struct built-in methods via Struct.new.

Example:

# bad
Bad = Struct.new(:members, :clone, :count)
b = Bad.new([], true, 1)
b.members #=> [] (overriding `Struct#members`)
b.clone #=> true (overriding `Object#clone`)
b.count #=> 1 (overriding `Enumerable#count`)

# good
Good = Struct.new(:id, :name)
g = Good.new(1, "foo")
g.members #=> [:id, :name]
g.clone #=> #<struct good id="1," name="foo">
g.count #=&gt; 2</struct>

There are no issues that match your filters.

Category
Status