Skip to content

Commit

Permalink
DEV: Fix Lint/ShadowedArgument (discourse#24733)
Browse files Browse the repository at this point in the history
  • Loading branch information
CvX authored Dec 6, 2023
1 parent 1e471f7 commit 4280c01
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/jobs/scheduled/periodical_updates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def self.should_update_long_topics?
(@call_count % 24) == 1
end

def execute(args = nil)
def execute(_ = nil)
# Feature topics in categories
CategoryFeaturedTopic.feature_topics(batched: true)

Expand Down
3 changes: 1 addition & 2 deletions lib/compression/pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ def extension

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
Expand Down
2 changes: 1 addition & 1 deletion lib/onebox/engine/standard_embed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def get_json_ld
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
Expand Down
2 changes: 1 addition & 1 deletion plugins/chat/lib/chat/user_notifications_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down
2 changes: 1 addition & 1 deletion spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def user_error_message(*keys)
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!
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/invites_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
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!
Expand Down

0 comments on commit 4280c01

Please sign in to comment.