rubocop / guard-rubocop

Guard plugin for RuboCop
MIT License
262 stars 55 forks source link

Conform to Ruby style guide on %r #17

Closed davetapley closed 7 years ago

davetapley commented 9 years ago

Prior to this change rubocop gives:

Guardfile:26:9: C: Use %r only for regular expressions matching more than 1 '/' character.
  watch(%r{.+\.rb$})
        ^^^^^^^^^^^
Guardfile:27:9: C: Use %r only for regular expressions matching more than 1 '/' character.
  watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
davetapley commented 9 years ago

Can you double check these regexes are equivalent :wink:

e2 commented 9 years ago

There's a feature request in Guard for globs: https://github.com/guard/guard/issues/649 - currently almost every Guard plugin out there triggers offenses with Rubocop defaults.

yujinakayama commented 7 years ago

The lastest RuboCop no longer reports the offenses.