Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy fact check should detect/remediate unscoped legacy facts. #129

Open
binford2k opened this issue Jun 6, 2023 · 4 comments
Open

Legacy fact check should detect/remediate unscoped legacy facts. #129

binford2k opened this issue Jun 6, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@binford2k
Copy link

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

@binford2k binford2k added the bug Something isn't working label Jun 6, 2023
@alexjfisher
Copy link

Already picked up by http://puppet-lint.com/checks/variable_scope/ surely?

@alexjfisher
Copy link

and tested here.

@binford2k
Copy link
Author

@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.

@fbhdk
Copy link

fbhdk commented Feb 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants