Skip to content

Commit 826d33a

Browse files
committed
(CONT-811) Correct Style/RedundantRegexpEscape
1 parent 69f3071 commit 826d33a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/puppet-lint/data.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ def parse_control_comments
562562
comment_token_types.include?(token.type)
563563
end
564564
control_comment_tokens = comment_tokens.select do |token|
565-
token.value.strip =~ %r{\Alint\:(ignore\:[\w\d]+|endignore)}
565+
token.value.strip =~ %r{\Alint:(ignore:[\w\d]+|endignore)}
566566
end
567567

568568
stack = []
@@ -572,7 +572,7 @@ def parse_control_comments
572572

573573
comment_words = token.value.strip.split(%r{\s+})
574574
comment_words.each_with_index do |word, i|
575-
if %r{\Alint\:(ignore|endignore)}.match?(word)
575+
if %r{\Alint:(ignore|endignore)}.match?(word)
576576
comment_data << word
577577
else
578578
# Once we reach the first non-controlcomment word, assume the rest

lib/puppet-lint/monkeypatches.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def expand!(vars = {})
2828
vars.each do |var, value|
2929
var = var.to_s
3030
var.gsub!(%r{[^a-zA-Z0-9_]}, '')
31-
changed = gsub!(%r{\%\{#{var}\}}, value.to_s)
31+
changed = gsub!(%r{%\{#{var}\}}, value.to_s)
3232
end
3333
break unless changed
3434
end

spec/unit/puppet-lint/bin_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def initialize(args)
300300
its(:exitstatus) { is_expected.to eq(1) }
301301

302302
its(:stdout) do
303-
is_expected.to match(%r{^(/|[A-Za-z]\:).+/spec/fixtures/test/manifests/fail\.pp$})
303+
is_expected.to match(%r{^(/|[A-Za-z]:).+/spec/fixtures/test/manifests/fail\.pp$})
304304
end
305305
end
306306

0 commit comments

Comments
 (0)