lib/skinny_controllers/policy/base.rb
Line is too long. [121/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
SkinnyControllers.logger.warn("method '#{action}' in policy '#{self.class.name}' was not found. Using :default?")
- Exclude checks
Unused method argument - o
. If it's necessary, use _
or _o
as an argument name to indicate that it won't be used. You can also write as read?(*)
if you want the method to accept any arguments but don't care about them. (https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars) Open
Open
def read?(o = object)
- Read upRead up
- Exclude checks
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
Add an empty line after magic comments. (https://github.com/bbatsov/ruby-style-guide#separate-magic-comments-from-code) Open
Open
module SkinnyControllers
- Read upRead up
- Exclude checks
Checks for a newline after the final magic comment.
Example:
# good
# frozen_string_literal: true
# Some documentation for Person
class Person
# Some code
end
# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
# Some code
end