Open binford2k opened 1 year ago
Already picked up by http://puppet-lint.com/checks/variable_scope/ surely?
@alexjfisher I think that it should still correct this. If the user dislikes that style and disables that check, the legacy fact check should still identify known obsoleted facts.
I agree that legacy_facts should detect this, also in order for --fix to correct these. It will save a lot of people a lot of time.
This spec test validates that an unscoped fact like
$osfamily
is not detected or remediated. I think that it should be detected, especially in context of Puppet 8 deprecating those facts.This means that people writing code that shadows those legacy facts by using the same variable name will now trigger a warning. If they genuinely want to do that, then they can configure the linter to skip that code 😁
@joshcooper @bastelfreak