MLSDev/easy-matchers

View on GitHub
lib/matchers/validations/base_validation_matcher.rb

Summary

Maintainability
A
0 mins
Test Coverage

Unused method argument - symbol_name. If it's necessary, use _ or _symbol_name as an argument name to indicate that it won't be used. You can also write as with_if(*) if you want the method to accept any arguments but don't care about them.
Open

      def with_if(symbol_name)

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused method argument - context. If it's necessary, use _ or _context as an argument name to indicate that it won't be used. You can also write as on(*) if you want the method to accept any arguments but don't care about them.
Open

      def on(context)

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused method argument - value. If it's necessary, use _ or _value as an argument name to indicate that it won't be used. You can also write as allow_blank(*) if you want the method to accept any arguments but don't care about them.
Open

      def allow_blank(value = true)

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused method argument - value. If it's necessary, use _ or _value as an argument name to indicate that it won't be used. You can also write as allow_nil(*) if you want the method to accept any arguments but don't care about them.
Open

      def allow_nil(value = true)

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused method argument - value. If it's necessary, use _ or _value as an argument name to indicate that it won't be used. You can also write as strict(*) if you want the method to accept any arguments but don't care about them.
Open

      def strict(value)

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Unused method argument - symbol_name. If it's necessary, use _ or _symbol_name as an argument name to indicate that it won't be used. You can also write as with_unless(*) if you want the method to accept any arguments but don't care about them.
Open

      def with_unless(symbol_name)

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

There are no issues that match your filters.

Category
Status