Add and apply Rails/I18nLocaleAssignment rule

This rule was added in rubocop-rails 2.11.0.

Although we prevent I18n locale leaking between tests by setting it
before each test, the `with_locale` method makes the scope of the locale
change more obvious.
This commit is contained in:
Javi Martín
2021-08-11 05:16:06 +02:00
parent 2bfa9068f1
commit 071bcb7023
4 changed files with 27 additions and 16 deletions

View File

@@ -248,6 +248,11 @@ Rails/HasManyOrHasOneDependent:
Rails/HttpStatus:
Enabled: true
Rails/I18nLocaleAssignment:
Enabled: true
Exclude:
- "spec/spec_helper.rb"
Rails/InverseOf:
Enabled: true
Exclude: