From bb685bb964c715e1e5834bbc1cc9ab8ddada1d3a Mon Sep 17 00:00:00 2001 From: Robert Haines Date: Sun, 22 Sep 2019 11:30:18 +0100 Subject: [PATCH] Configure Style/RegexpLiteral cop. Allow inner slashes when using // for regex literals. Allow the Guardfile to use a syntax that is more consistent with its own style. --- .rubocop.yml | 5 +++++ .rubocop_rubyzip.yml | 10 ---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 9888bee7..ed5cfe9e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -16,6 +16,11 @@ Lint/UselessComparison: Exclude: - 'test/entry_test.rb' +Style/RegexpLiteral: + AllowInnerSlashes: true + Exclude: + - 'Guardfile' + # Turn this cop off for these files as it fires for objects without # an empty? method. Style/ZeroLengthPredicate: diff --git a/.rubocop_rubyzip.yml b/.rubocop_rubyzip.yml index 74cd0966..4877f024 100644 --- a/.rubocop_rubyzip.yml +++ b/.rubocop_rubyzip.yml @@ -206,16 +206,6 @@ Style/NumericPredicate: - 'test/file_split_test.rb' - 'test/test_helper.rb' -# Offense count: 4 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, AllowInnerSlashes. -# SupportedStyles: slashes, percent_r, mixed -Style/RegexpLiteral: - Exclude: - - 'lib/zip/filesystem.rb' - - 'test/entry_test.rb' - - 'test/settings_test.rb' - # Offense count: 15 # Cop supports --auto-correct. # Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.