Update rubocop to version 1.79.0 (#35502)

This commit is contained in:
Matt Jankowski 2025-07-25 03:22:05 -04:00 committed by GitHub
parent 960f693219
commit 2e35defeec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 16 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# This configuration was generated by # This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-offense-counts --no-auto-gen-timestamp` # `rubocop --auto-gen-config --auto-gen-only-exclude --no-offense-counts --no-auto-gen-timestamp`
# using RuboCop version 1.77.0. # using RuboCop version 1.79.0.
# The point is for the user to remove these configuration records # The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base. # one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new # Note that changes in the inspected code, or installation of new

View File

@ -765,7 +765,7 @@ GEM
rspec-mocks (~> 3.0) rspec-mocks (~> 3.0)
sidekiq (>= 5, < 9) sidekiq (>= 5, < 9)
rspec-support (3.13.4) rspec-support (3.13.4)
rubocop (1.78.0) rubocop (1.79.0)
json (~> 2.3) json (~> 2.3)
language_server-protocol (~> 3.17.0.2) language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0) lint_roller (~> 1.1.0)
@ -773,8 +773,9 @@ GEM
parser (>= 3.3.0.2) parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0) regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.45.1, < 2.0) rubocop-ast (>= 1.46.0, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
tsort (>= 0.2.0)
unicode-display_width (>= 2.4.0, < 4.0) unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.46.0) rubocop-ast (1.46.0)
parser (>= 3.3.7.2) parser (>= 3.3.7.2)
@ -880,6 +881,7 @@ GEM
bindata (~> 2.4) bindata (~> 2.4)
openssl (> 2.0) openssl (> 2.0)
openssl-signature_algorithm (~> 1.0) openssl-signature_algorithm (~> 1.0)
tsort (0.2.0)
tty-color (0.6.0) tty-color (0.6.0)
tty-cursor (0.7.1) tty-cursor (0.7.1)
tty-prompt (0.23.1) tty-prompt (0.23.1)

View File

@ -2,6 +2,7 @@
class Api::V1::Admin::TagsController < Api::BaseController class Api::V1::Admin::TagsController < Api::BaseController
include Authorization include Authorization
before_action -> { authorize_if_got_token! :'admin:read' }, only: [:index, :show] before_action -> { authorize_if_got_token! :'admin:read' }, only: [:index, :show]
before_action -> { authorize_if_got_token! :'admin:write' }, only: :update before_action -> { authorize_if_got_token! :'admin:write' }, only: :update

View File

@ -45,7 +45,9 @@ class EmojiFormatter
i += 1 i += 1
if inside_shortname && text[i] == ':' if inside_shortname && text[i] == ':'
inside_shortname = false # https://github.com/rubocop/rubocop/issues/14383
# False positive in line below, remove disable when resolved
inside_shortname = false # rubocop:disable Lint/UselessAssignment
shortcode = text[(shortname_start_index + 1)..(i - 1)] shortcode = text[(shortname_start_index + 1)..(i - 1)]
char_after = text[i + 1] char_after = text[i + 1]

View File

@ -6,6 +6,7 @@ RSpec.describe AccountableConcern do
let(:hoge_class) do let(:hoge_class) do
Class.new do Class.new do
include AccountableConcern include AccountableConcern
attr_reader :current_account attr_reader :current_account
def initialize(current_account) def initialize(current_account)

View File

@ -49,6 +49,7 @@ RSpec.describe 'Routes under accounts/' do
context 'with local username encoded at' do context 'with local username encoded at' do
include RSpec::Rails::RequestExampleGroup include RSpec::Rails::RequestExampleGroup
let(:username) { 'alice' } let(:username) { 'alice' }
it 'routes /%40:username' do it 'routes /%40:username' do
@ -140,6 +141,7 @@ RSpec.describe 'Routes under accounts/' do
context 'with remote username encoded at' do context 'with remote username encoded at' do
include RSpec::Rails::RequestExampleGroup include RSpec::Rails::RequestExampleGroup
let(:username) { 'alice%40example.com' } let(:username) { 'alice%40example.com' }
let(:username_decoded) { 'alice@example.com' } let(:username_decoded) { 'alice@example.com' }

View File

@ -6,6 +6,7 @@ RSpec.describe ExistingUsernameValidator do
let(:record_class) do let(:record_class) do
Class.new do Class.new do
include ActiveModel::Validations include ActiveModel::Validations
attr_accessor :contact, :friends attr_accessor :contact, :friends
def self.name def self.name

View File

@ -6,6 +6,7 @@ RSpec.describe LanguageValidator do
let(:record_class) do let(:record_class) do
Class.new do Class.new do
include ActiveModel::Validations include ActiveModel::Validations
attr_accessor :locale attr_accessor :locale
validates :locale, language: true validates :locale, language: true

View File

@ -6,6 +6,7 @@ RSpec.describe UnreservedUsernameValidator do
let(:record_class) do let(:record_class) do
Class.new do Class.new do
include ActiveModel::Validations include ActiveModel::Validations
attr_accessor :username attr_accessor :username
validates_with UnreservedUsernameValidator validates_with UnreservedUsernameValidator

View File

@ -6,6 +6,7 @@ RSpec.describe URLValidator do
let(:record_class) do let(:record_class) do
Class.new do Class.new do
include ActiveModel::Validations include ActiveModel::Validations
attr_accessor :profile attr_accessor :profile
validates :profile, url: true validates :profile, url: true