cortex-cms/cortex

View on GitHub
app/models/cortex/field_type.rb

Summary

Maintainability
A
0 mins
Test Coverage

Unused block argument - options. If it's necessary, use _ or _options as an argument name to indicate that it won't be used.
Open

      validations.all? do |type, options|
Severity: Minor
Found in app/models/cortex/field_type.rb by rubocop

This cop checks for unused block arguments.

Example:

# bad

do_something do |used, unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Example:

#good

do_something do |used, _unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

Unused block argument - options. If it's necessary, use _ or _options as an argument name to indicate that it won't be used.
Open

      validations.all? do |type, options|
Severity: Minor
Found in app/models/cortex/field_type.rb by rubocop

This cop checks for unused block arguments.

Example:

# bad

do_something do |used, unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Example:

#good

do_something do |used, _unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

There are no issues that match your filters.

Category
Status