mirror of
https://github.com/discourse/discourse.git
synced 2024-11-21 16:38:15 -06:00
DEV: Fix Lint/ShadowedArgument (#24733)
This commit is contained in:
parent
1e471f7ec2
commit
4280c01153
@ -14,7 +14,7 @@ module Jobs
|
||||
(@call_count % 24) == 1
|
||||
end
|
||||
|
||||
def execute(args = nil)
|
||||
def execute(_ = nil)
|
||||
# Feature topics in categories
|
||||
CategoryFeaturedTopic.feature_topics(batched: true)
|
||||
|
||||
|
@ -12,10 +12,9 @@ module Compression
|
||||
|
||||
def compress(path, target_name)
|
||||
current_target = target_name
|
||||
@strategies.reduce("") do |compressed_path, strategy|
|
||||
@strategies.reduce(nil) do |_, strategy|
|
||||
compressed_path = strategy.compress(path, current_target)
|
||||
current_target = compressed_path.split("/").last
|
||||
|
||||
compressed_path
|
||||
end
|
||||
end
|
||||
|
@ -160,7 +160,7 @@ module Onebox
|
||||
end
|
||||
|
||||
def set_from_normalizer_data(normalizer)
|
||||
normalizer.data.each do |k, v|
|
||||
normalizer.data.each do |k, _|
|
||||
v = normalizer.send(k)
|
||||
@raw[k] ||= v unless v.nil?
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
module Chat
|
||||
module UserNotificationsExtension
|
||||
def chat_summary(user, opts)
|
||||
def chat_summary(user, _ = nil)
|
||||
guardian = Guardian.new(user)
|
||||
return unless guardian.can_chat?
|
||||
|
||||
|
@ -32,7 +32,7 @@ RSpec.describe User do
|
||||
describe "default sidebar section links" do
|
||||
fab!(:category)
|
||||
|
||||
fab!(:secured_category) do |category|
|
||||
fab!(:secured_category) do
|
||||
category = Fabricate(:category)
|
||||
category.permissions = { "staff" => :full }
|
||||
category.save!
|
||||
|
@ -300,7 +300,7 @@ RSpec.describe InvitesController do
|
||||
context "when topic is private" do
|
||||
fab!(:group)
|
||||
|
||||
fab!(:secured_category) do |category|
|
||||
fab!(:secured_category) do
|
||||
category = Fabricate(:category)
|
||||
category.permissions = { group.name => :full }
|
||||
category.save!
|
||||
|
Loading…
Reference in New Issue
Block a user