No warning from rubocop.
Fails. Even if we specify slashes in EnforcedStyle property in .rubocop.yml.
repro.rb:3:3: C: Style/RegexpLiteral: Use %r around regular expression.
/.*\/tests~.*/
^^^^^^^^^^^^^^
Run rubocop in this snippet:
TEST_FILE_REGEX = [
/.*\.tools.*/,
/.*\/tests~.*/
].freeze
$ bundle exec rubocop -V
0.52.1 (using Parser 2.4.0.2, running on ruby 2.5.0 x86_64-linux)
For this behavior, you should configure AllowInnerSlashes as well:
Style/RegexpLiteral:
AllowInnerSlashes: true
Most helpful comment
For this behavior, you should configure
AllowInnerSlashesas well: