Merge pull request #13227 from chitty/rubocop-style-autocorrection-fix

Autocorrect rubocop offenses Style/RedundantAssignment and Style/RedundantArgument
This commit is contained in:
Maikel
2025-03-26 10:16:35 +11:00
committed by GitHub
3 changed files with 2 additions and 17 deletions

View File

@@ -702,19 +702,6 @@ Style/PreferredHashMethods:
Exclude:
- 'app/controllers/api/v0/shipments_controller.rb'
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Methods.
Style/RedundantArgument:
Exclude:
- 'engines/dfc_provider/app/services/authorization_control.rb'
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantAssignment:
Exclude:
- 'spec/models/database_spec.rb'
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AutoCorrect, AllowComments.

View File

@@ -47,7 +47,7 @@ class AuthorizationControl
end
def access_token
@request.headers['Authorization'].to_s.split(' ').last
@request.headers['Authorization'].to_s.split.last
end
def ofn_api_token

View File

@@ -102,7 +102,7 @@ RSpec.describe "Database" do
orphaned_records_query = generate_orphaned_records_query(model_class, foreign_key_table_name,
foreign_key_column)
migration = <<~MIGRATION
<<~MIGRATION
# Orphaned records can be found before running this migration with the following SQL:
#{orphaned_records_query}
@@ -113,8 +113,6 @@ RSpec.describe "Database" do
end
end
MIGRATION
migration
end
def generate_orphaned_records_query(model_class, foreign_key_table_name, foreign_key_column)