dry-rb/dry-matcher

View on GitHub
lib/dry/matcher/result_matcher.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
95%

Empty line detected around arguments.
Open


        if result.failure?
Severity: Minor
Found in lib/dry/matcher/result_matcher.rb by rubocop

This cops checks if empty lines exist around the arguments of a method invocation.

Example:

# bad
do_something(
  foo

)

process(bar,

        baz: qux,
        thud: fred)

some_method(

  [1,2,3],
  x: y
)

# good
do_something(
  foo
)

process(bar,
        baz: qux,
        thud: fred)

some_method(
  [1,2,3],
  x: y
)

Avoid the use of the case equality operator ===.
Open

      elsif value.is_a?(::Array) && patterns.any? { |p| p === value[0] }
Severity: Minor
Found in lib/dry/matcher/result_matcher.rb by rubocop

This cop checks for uses of the case equality operator(===).

Example:

# bad
Array === something
(1..100) === 7
/something/ === some_string

# good
something.is_a?(Array)
(1..100).include?(7)
some_string =~ /something/

Avoid the use of the case equality operator ===.
Open

      elsif patterns.any? { |p| p === value }
Severity: Minor
Found in lib/dry/matcher/result_matcher.rb by rubocop

This cop checks for uses of the case equality operator(===).

Example:

# bad
Array === something
(1..100) === 7
/something/ === some_string

# good
something.is_a?(Array)
(1..100).include?(7)
some_string =~ /something/

Empty line detected around arguments.
Open


        if result.success?
Severity: Minor
Found in lib/dry/matcher/result_matcher.rb by rubocop

This cops checks if empty lines exist around the arguments of a method invocation.

Example:

# bad
do_something(
  foo

)

process(bar,

        baz: qux,
        thud: fred)

some_method(

  [1,2,3],
  x: y
)

# good
do_something(
  foo
)

process(bar,
        baz: qux,
        thud: fred)

some_method(
  [1,2,3],
  x: y
)

There are no issues that match your filters.

Category
Status