mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 12:55:56 +01:00
Update rubocop
to version 1.69.1 (#32967)
This commit is contained in:
parent
6615f17b48
commit
342055cb15
7 changed files with 25 additions and 14 deletions
|
@ -1,4 +1,7 @@
|
||||||
---
|
---
|
||||||
|
Style/ArrayIntersect:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
Style/ClassAndModuleChildren:
|
Style/ClassAndModuleChildren:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
@ -19,6 +22,12 @@ Style/HashSyntax:
|
||||||
EnforcedShorthandSyntax: either
|
EnforcedShorthandSyntax: either
|
||||||
EnforcedStyle: ruby19_no_mixed_keys
|
EnforcedStyle: ruby19_no_mixed_keys
|
||||||
|
|
||||||
|
Style/KeywordArgumentsMerging:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Style/MultipleComparison:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
Style/NumericLiterals:
|
Style/NumericLiterals:
|
||||||
AllowedPatterns:
|
AllowedPatterns:
|
||||||
- \d{4}_\d{2}_\d{2}_\d{6}
|
- \d{4}_\d{2}_\d{2}_\d{6}
|
||||||
|
@ -37,6 +46,9 @@ Style/RedundantFetchBlock:
|
||||||
Style/RescueStandardError:
|
Style/RescueStandardError:
|
||||||
EnforcedStyle: implicit
|
EnforcedStyle: implicit
|
||||||
|
|
||||||
|
Style/SafeNavigationChainLength:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
Style/SymbolArray:
|
Style/SymbolArray:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
|
|
@ -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.66.1.
|
# using RuboCop version 1.69.1.
|
||||||
# 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
|
||||||
|
@ -35,7 +35,6 @@ Rails/OutputSafety:
|
||||||
# Configuration parameters: AllowedVars.
|
# Configuration parameters: AllowedVars.
|
||||||
Style/FetchEnvVar:
|
Style/FetchEnvVar:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'app/lib/translation_service.rb'
|
|
||||||
- 'config/environments/production.rb'
|
- 'config/environments/production.rb'
|
||||||
- 'config/initializers/2_limited_federation_mode.rb'
|
- 'config/initializers/2_limited_federation_mode.rb'
|
||||||
- 'config/initializers/3_omniauth.rb'
|
- 'config/initializers/3_omniauth.rb'
|
||||||
|
|
16
Gemfile.lock
16
Gemfile.lock
|
@ -327,7 +327,7 @@ GEM
|
||||||
azure-blob (~> 0.5.2)
|
azure-blob (~> 0.5.2)
|
||||||
hashie (~> 5.0)
|
hashie (~> 5.0)
|
||||||
jmespath (1.6.2)
|
jmespath (1.6.2)
|
||||||
json (2.8.1)
|
json (2.9.0)
|
||||||
json-canonicalization (1.0.0)
|
json-canonicalization (1.0.0)
|
||||||
json-jwt (1.15.3.1)
|
json-jwt (1.15.3.1)
|
||||||
activesupport (>= 4.2)
|
activesupport (>= 4.2)
|
||||||
|
@ -664,7 +664,7 @@ GEM
|
||||||
redis (>= 4)
|
redis (>= 4)
|
||||||
redlock (1.3.2)
|
redlock (1.3.2)
|
||||||
redis (>= 3.0.0, < 6.0)
|
redis (>= 3.0.0, < 6.0)
|
||||||
regexp_parser (2.9.2)
|
regexp_parser (2.9.3)
|
||||||
reline (0.5.12)
|
reline (0.5.12)
|
||||||
io-console (~> 0.5)
|
io-console (~> 0.5)
|
||||||
request_store (1.6.0)
|
request_store (1.6.0)
|
||||||
|
@ -708,21 +708,21 @@ GEM
|
||||||
rspec-mocks (~> 3.0)
|
rspec-mocks (~> 3.0)
|
||||||
sidekiq (>= 5, < 8)
|
sidekiq (>= 5, < 8)
|
||||||
rspec-support (3.13.1)
|
rspec-support (3.13.1)
|
||||||
rubocop (1.66.1)
|
rubocop (1.69.1)
|
||||||
json (~> 2.3)
|
json (~> 2.3)
|
||||||
language_server-protocol (>= 3.17.0)
|
language_server-protocol (>= 3.17.0)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
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.4, < 3.0)
|
regexp_parser (>= 2.9.3, < 3.0)
|
||||||
rubocop-ast (>= 1.32.2, < 2.0)
|
rubocop-ast (>= 1.36.2, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 2.4.0, < 3.0)
|
unicode-display_width (>= 2.4.0, < 4.0)
|
||||||
rubocop-ast (1.32.3)
|
rubocop-ast (1.36.2)
|
||||||
parser (>= 3.3.1.0)
|
parser (>= 3.3.1.0)
|
||||||
rubocop-capybara (2.21.0)
|
rubocop-capybara (2.21.0)
|
||||||
rubocop (~> 1.41)
|
rubocop (~> 1.41)
|
||||||
rubocop-performance (1.22.1)
|
rubocop-performance (1.23.0)
|
||||||
rubocop (>= 1.48.1, < 2.0)
|
rubocop (>= 1.48.1, < 2.0)
|
||||||
rubocop-ast (>= 1.31.1, < 2.0)
|
rubocop-ast (>= 1.31.1, < 2.0)
|
||||||
rubocop-rails (2.27.0)
|
rubocop-rails (2.27.0)
|
||||||
|
|
|
@ -261,7 +261,7 @@ class Request
|
||||||
outer_e = nil
|
outer_e = nil
|
||||||
port = args.first
|
port = args.first
|
||||||
|
|
||||||
addresses = []
|
addresses = [] # rubocop:disable Lint/UselessAssignment # TODO: https://github.com/rubocop/rubocop/issues/13395
|
||||||
begin
|
begin
|
||||||
addresses = [IPAddr.new(host)]
|
addresses = [IPAddr.new(host)]
|
||||||
rescue IPAddr::InvalidAddressError
|
rescue IPAddr::InvalidAddressError
|
||||||
|
|
|
@ -4,7 +4,7 @@ class DomainValidator < ActiveModel::EachValidator
|
||||||
MAX_DOMAIN_LENGTH = 256
|
MAX_DOMAIN_LENGTH = 256
|
||||||
MIN_LABEL_LENGTH = 1
|
MIN_LABEL_LENGTH = 1
|
||||||
MAX_LABEL_LENGTH = 63
|
MAX_LABEL_LENGTH = 63
|
||||||
ALLOWED_CHARACTERS_RE = /^[a-z0-9\-]+$/i
|
ALLOWED_CHARACTERS_RE = /^[a-z0-9-]+$/i
|
||||||
|
|
||||||
def validate_each(record, attribute, value)
|
def validate_each(record, attribute, value)
|
||||||
return if value.blank?
|
return if value.blank?
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
dev_null = Logger.new('/dev/null')
|
dev_null = Logger.new(File::NULL)
|
||||||
|
|
||||||
Rails.logger = dev_null
|
Rails.logger = dev_null
|
||||||
ActiveRecord::Base.logger = dev_null
|
ActiveRecord::Base.logger = dev_null
|
||||||
|
|
|
@ -592,7 +592,7 @@ namespace :mastodon do
|
||||||
end
|
end
|
||||||
|
|
||||||
def disable_log_stdout!
|
def disable_log_stdout!
|
||||||
dev_null = Logger.new('/dev/null')
|
dev_null = Logger.new(File::NULL)
|
||||||
|
|
||||||
Rails.logger = dev_null
|
Rails.logger = dev_null
|
||||||
ActiveRecord::Base.logger = dev_null
|
ActiveRecord::Base.logger = dev_null
|
||||||
|
|
Loading…
Reference in a new issue