am-kantox/dry-mutations

View on GitHub
lib/dry/mutations/dsl/weirdo.rb

Summary

Maintainability
A
0 mins
Test Coverage

FIXME found
Open

        # FIXME: try-catch and call super in rescue clause
Severity: Minor
Found in lib/dry/mutations/dsl/weirdo.rb by fixme

FIXME found
Open

                false # FIXME
Severity: Minor
Found in lib/dry/mutations/dsl/weirdo.rb by fixme

When using method_missing, define respond_to_missing? and fall back on super.
Open

        def method_missing m, *args, &_cb
          puts "==> [MM] “#{m}” called with args: “#{args.inspect}”"
          name, current = args.shift, @current
          schema do
            configure do
Severity: Minor
Found in lib/dry/mutations/dsl/weirdo.rb by rubocop

This cop checks for the presence of method_missing without also defining respond_to_missing? and falling back on super.

Example:

#bad
def method_missing(name, *args)
  # ...
end

#good
def respond_to_missing?(name, include_private)
  # ...
end

def method_missing(name, *args)
  # ...
  super
end

Favor a normal if-statement over a modifier clause in a multiline statement.
Open

        def method_missing m, *args, &_cb
          puts "==> [MM] “#{m}” called with args: “#{args.inspect}”"
          name, current = args.shift, @current
          schema do
            configure do
Severity: Minor
Found in lib/dry/mutations/dsl/weirdo.rb by rubocop

Checks for uses of if/unless modifiers with multiple-lines bodies.

Example:

# bad
{
  result: 'this should not happen'
} unless cond

# good
{ result: 'ok' } if cond

There are no issues that match your filters.

Category
Status