RuboCop: Switch to `EncforcedStyle: use_builtin_english_names` for `Style/SpecialGlobalVars`
Problem
In !83879 (merged) we've changed EncforcedStyle to use_perl_names for Style/SpecialGlobalVars to be consistent when using global variables.
When using EncforcedStyle to use_english_names and auto-correcting remaining offenses did fail the pipelines due to missing require 'English'. It was too dangerous to enable this style.
Proposed solution
Switch to EncforcedStyle: use_builtin_english_names which behaves like EncforcedStyle: use_perl_names but allows the use of $LOADED_FEATURES and $LOAD_PATH since they are builtin and require "English" is not mandatory.
See GitHub issue https://github.com/rubocop/rubocop/issues/5891#issuecomment-1093962138 and merged PR https://github.com/rubocop/rubocop/issues/5891.
Tasks:
- Upgrade to RuboCop
>= 1.28which contains https://github.com/rubocop/rubocop/pull/10521 - Set
EncforcedStyle: use_builtin_english_namesforStyle/SpecialGlobalVars - Auto-correct offenses via
bundle exec rubocop -A --only Style/SpecialGlobalVars(only a few)
Alternative proposal
Switch back to EncforcedStyle: use_english_names.
Tasks:
- Upgrade to RuboCop
>= 1.19which contains https://github.com/rubocop/rubocop/pull/9925 - Set
EncforcedStyle: use_english_namesforStyle/SpecialGlobalVars - Auto-correct offenses via
bundle exec rubocop -A --only Style/SpecialGlobalVars(which adds a bunch ofrequire 'English')
Notes
We've decided to switch the proposed solution in #358427 (comment 911311403).