mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 18:45:41 +01:00
Enable Style/IfUnlessModifier RuboCop (#30260)
This commit is contained in:
parent
9ec7c1f892
commit
13fb54920b
3 changed files with 3 additions and 14 deletions
|
@ -1,6 +1,6 @@
|
|||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp`
|
||||
# using RuboCop version 1.62.1.
|
||||
# using RuboCop version 1.63.5.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
|
@ -122,13 +122,6 @@ Style/HashTransformValues:
|
|||
- 'app/serializers/rest/web_push_subscription_serializer.rb'
|
||||
- 'app/services/import_service.rb'
|
||||
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Style/IfUnlessModifier:
|
||||
Exclude:
|
||||
- 'config/environments/production.rb'
|
||||
- 'config/initializers/devise.rb'
|
||||
- 'config/initializers/ffmpeg.rb'
|
||||
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Style/MapToHash:
|
||||
Exclude:
|
||||
|
|
|
@ -86,9 +86,7 @@ Rails.application.configure do
|
|||
config.lograge.enabled = true
|
||||
|
||||
config.lograge.custom_payload do |controller|
|
||||
if controller.respond_to?(:signed_request?) && controller.signed_request?
|
||||
{ key: controller.signature_key_id }
|
||||
end
|
||||
{ key: controller.signature_key_id } if controller.respond_to?(:signed_request?) && controller.signed_request?
|
||||
end
|
||||
|
||||
# Use a different logger for distributed setups.
|
||||
|
|
|
@ -79,9 +79,7 @@ module Devise
|
|||
return pass
|
||||
end
|
||||
|
||||
if validate(resource)
|
||||
success!(resource)
|
||||
end
|
||||
success!(resource) if validate(resource)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in a new issue