Skip to content

Commit 43540f7

Browse files
Further cleanup
Signed-off-by: David A. Wheeler <[email protected]>
1 parent f488a50 commit 43540f7

File tree

8 files changed

+5
-11
lines changed

8 files changed

+5
-11
lines changed

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,3 +265,7 @@ Style/YodaExpression:
265265
Enabled: false
266266
Metrics/BlockLength:
267267
Max: 36
268+
Lint/RedundantRequireStatement:
269+
Enabled: true # Let RuboCop remove truly redundant requires
270+
Rails/WhereRange:
271+
Enabled: true # Modern Rails range syntax is cleaner and equivalent

app/controllers/projects_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
require 'addressable/uri'
88
require 'net/http'
9-
require 'set'
109

1110
# rubocop:disable Metrics/ClassLength
1211
class ProjectsController < ApplicationController

app/lib/chief.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
# the Detective INPUTS and OUTPUTS to determine what order to run, and
1414
# run them in parallel in an appropriate order.
1515

16-
require 'set'
17-
1816
# rubocop:disable Metrics/ClassLength
1917
class Chief
2018
# Confidence level (1..5) where automation result will *override*

app/lib/hardened_sites_detective.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
# Determine if project sites support HTTPS
88

9-
require 'set'
10-
119
class HardenedSitesDetective < Detective
1210
# All of the security-hardening headers that need to be present to pass.
1311
# They're listed in the same order as the criteria text.

app/models/badge.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
# OpenSSF Best Practices badge contributors
55
# SPDX-License-Identifier: MIT
66

7-
require 'set'
8-
97
# rubocop: disable Metrics/ClassLength
108
class Badge
119
ACCEPTABLE_PERCENTAGES = (0..99).to_a.freeze

app/models/project.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ def self.projects_to_remind
536536
.where('badge_percentage_0 < 100')
537537
.where('lost_passing_at IS NULL OR lost_passing_at < ?',
538538
LOST_PASSING_REMINDER.days.ago)
539-
.where('projects.updated_at < ?', LAST_UPDATED_REMINDER.days.ago)
539+
.where(projects: { updated_at: ...LAST_UPDATED_REMINDER.days.ago })
540540
.where('last_reminder_at IS NULL OR last_reminder_at < ?',
541541
LAST_SENT_REMINDER.days.ago)
542542
.joins(:user).references(:user) # Need this to check email address

config/initializers/rack_attack.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
# This assumes that "ClientIp.acquire" works correctly.
1010

11-
require 'set'
12-
1311
# Use recommended format of Rack::Attack config
1412
# rubocop: disable Style/ClassAndModuleChildren
1513
# rubocop: disable Style/IfUnlessModifier, Style/MethodCalledOnDoEndBlock

test/models/criteria_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# SPDX-License-Identifier: MIT
66

77
require 'test_helper'
8-
require 'set'
98

109
# rubocop:disable Metrics/ClassLength
1110
class CriteriaTest < ActiveSupport::TestCase

0 commit comments

Comments
 (0)