diff options
author | Tim Smith <tsmith84@gmail.com> | 2021-12-31 23:37:21 -0500 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2021-12-31 23:37:21 -0500 |
commit | 8856702f3f83570ac466dc016b3aba005f8b3949 (patch) | |
tree | f4309fbdfbef78e740aa7127634092f0ddfeb7fd /lib | |
parent | bb6116d12fbc75dbb3d1daa36b8413b1bc6638d1 (diff) | |
download | chef-Style_SelectByRegexp.tar.gz |
Resolve Style/SelectByRegexp warningsStyle_SelectByRegexp
Simplify how we collect or reject data based on regex matches
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/cookbook/syntax_check.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/cookbook/syntax_check.rb b/lib/chef/cookbook/syntax_check.rb index 8b593eea81..555d2f6715 100644 --- a/lib/chef/cookbook/syntax_check.rb +++ b/lib/chef/cookbook/syntax_check.rb @@ -113,7 +113,7 @@ class Chef end def remove_uninteresting_ruby_files(file_list) - file_list.reject { |f| f =~ %r{#{Regexp.quote(cookbook_path)}/(files|templates)/} } + file_list.grep_v(%r{#{Regexp.quote(cookbook_path)}/(files|templates)/}) end def ruby_files |