Fix `Lint/UnusedBlockArgument` cop (#27777)
parent
5af47fbff8
commit
c875dfc90b
|
@ -24,15 +24,6 @@ Lint/NonLocalExitFromIterator:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'app/helpers/jsonld_helper.rb'
|
- 'app/helpers/jsonld_helper.rb'
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
|
||||||
Lint/UnusedBlockArgument:
|
|
||||||
Exclude:
|
|
||||||
- 'config/initializers/content_security_policy.rb'
|
|
||||||
- 'config/initializers/doorkeeper.rb'
|
|
||||||
- 'config/initializers/paperclip.rb'
|
|
||||||
- 'config/initializers/simple_form.rb'
|
|
||||||
|
|
||||||
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
||||||
Metrics/AbcSize:
|
Metrics/AbcSize:
|
||||||
Max: 144
|
Max: 144
|
||||||
|
|
|
@ -67,7 +67,7 @@ end
|
||||||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
||||||
# Rails.application.config.content_security_policy_report_only = true
|
# Rails.application.config.content_security_policy_report_only = true
|
||||||
|
|
||||||
Rails.application.config.content_security_policy_nonce_generator = ->(request) { SecureRandom.base64(16) }
|
Rails.application.config.content_security_policy_nonce_generator = ->(_request) { SecureRandom.base64(16) }
|
||||||
|
|
||||||
Rails.application.config.content_security_policy_nonce_directives = %w(style-src)
|
Rails.application.config.content_security_policy_nonce_directives = %w(style-src)
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ Rails.application.reloader.to_prepare do
|
||||||
p.worker_src :none
|
p.worker_src :none
|
||||||
end
|
end
|
||||||
|
|
||||||
LetterOpenerWeb::LettersController.after_action do |p|
|
LetterOpenerWeb::LettersController.after_action do
|
||||||
request.content_security_policy_nonce_directives = %w(script-src)
|
request.content_security_policy_nonce_directives = %w(script-src)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -169,7 +169,7 @@ Doorkeeper.configure do
|
||||||
# Under some circumstances you might want to have applications auto-approved,
|
# Under some circumstances you might want to have applications auto-approved,
|
||||||
# so that the user skips the authorization step.
|
# so that the user skips the authorization step.
|
||||||
# For example if dealing with a trusted application.
|
# For example if dealing with a trusted application.
|
||||||
skip_authorization do |resource_owner, client|
|
skip_authorization do |_resource_owner, client|
|
||||||
client.application.superapp?
|
client.application.superapp?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ Paperclip.interpolates :filename do |attachment, style|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Paperclip.interpolates :prefix_path do |attachment, style|
|
Paperclip.interpolates :prefix_path do |attachment, _style|
|
||||||
if attachment.storage_schema_version >= 1 && attachment.instance.respond_to?(:local?) && !attachment.instance.local?
|
if attachment.storage_schema_version >= 1 && attachment.instance.respond_to?(:local?) && !attachment.instance.local?
|
||||||
'cache' + File::SEPARATOR
|
'cache' + File::SEPARATOR
|
||||||
else
|
else
|
||||||
|
@ -19,7 +19,7 @@ Paperclip.interpolates :prefix_path do |attachment, style|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Paperclip.interpolates :prefix_url do |attachment, style|
|
Paperclip.interpolates :prefix_url do |attachment, _style|
|
||||||
if attachment.storage_schema_version >= 1 && attachment.instance.respond_to?(:local?) && !attachment.instance.local?
|
if attachment.storage_schema_version >= 1 && attachment.instance.respond_to?(:local?) && !attachment.instance.local?
|
||||||
'cache/'
|
'cache/'
|
||||||
else
|
else
|
||||||
|
|
|
@ -164,7 +164,7 @@ SimpleForm.setup do |config|
|
||||||
# config.item_wrapper_class = nil
|
# config.item_wrapper_class = nil
|
||||||
|
|
||||||
# How the label text should be generated altogether with the required text.
|
# How the label text should be generated altogether with the required text.
|
||||||
config.label_text = lambda { |label, required, explicit_label| "#{label} #{required}" }
|
config.label_text = lambda { |label, required, _explicit_label| "#{label} #{required}" }
|
||||||
|
|
||||||
# You can define the class to use on all labels. Default is nil.
|
# You can define the class to use on all labels. Default is nil.
|
||||||
# config.label_class = nil
|
# config.label_class = nil
|
||||||
|
|
Loading…
Reference in New Issue