We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ff9257 commit 3373b46Copy full SHA for 3373b46
lib/puppet-lint/plugins/legacy_facts/legacy_facts.rb
@@ -117,11 +117,11 @@ def check
117
118
# This matches legacy facts defined in the fact hash that use the top scope
119
# fact assignment.
120
- if token.value.start_with?("::facts['")
+ if token.value.match(%r{::facts\['(.*)'\]})
121
fact_name = token.value.match(%r{::facts\['(.*)'\]})[1]
122
123
# This matches legacy facts defined in the fact hash.
124
- elsif token.value.start_with?("facts['")
+ elsif token.value.match(%r{facts\['(.*)'\]})
125
fact_name = token.value.match(%r{facts\['(.*)'\]})[1]
126
127
# This matches using legacy facts in a the new structured fact. For
0 commit comments