puppet-lint icon indicating copy to clipboard operation
puppet-lint copied to clipboard

Detect unnecessary $ in enclosed variables

Open rodjek opened this issue 7 years ago • 1 comments

${$foo} is valid code, but the second $ is unnecessary and should be detected and fixed. This should also be added to the style guide.

/cc #674 #655

rodjek avatar Mar 27 '17 06:03 rodjek

What about variables manipulations inside the string?

Simple example:

$foo = 25
$bar = "${foo}" # 25
$baz = "${$foo}" # 25
$qux = "${$foo + 200}" # 225
$quux = "${foo + 200}" # fail

2fa avatar Oct 18 '17 16:10 2fa