-
Notifications
You must be signed in to change notification settings - Fork 14
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
Lint behaves weird when fixing a top-level structured fact reference #189
Comments
found to be an issue with puppet-lint, issue can be replicated using the above manifest example and running lint with the |
Prior to this commit, if you had a top scope structured fact like this in your manifest `$::my_structured_fact['foo']['test']`, lint would return an invalid correction when passed the fix flag. Now, we have altered the top_scope_facts plugin, to first check if it is a structured fact, and if one is found using regex, apply different logic to fix.
Prior to this commit, if you had a top scope structured fact like this in your manifest `$::my_structured_fact['foo']['test']`, lint would return an invalid correction when passed the fix flag. Now, we have altered the top_scope_facts plugin, to first check if it is a structured fact, and if one is found using regex, apply different logic to fix.
Prior to this commit, if you had a top scope structured fact like this in your manifest `$::my_structured_fact['foo']['test']`, lint would return an invalid correction when passed the fix flag. Now, we have altered the top_scope_facts plugin, to first check if it is a structured fact, and if one is found using regex, apply different logic to fix.
Prior to this commit, if you had a top scope structured fact like this in your manifest `$::my_structured_fact['foo']['test']`, lint would return an invalid correction when passed the fix flag. Now, we have altered the top_scope_facts plugin, to first check if it is a structured fact, and if one is found using regex, apply different logic to fix.
Prior to this commit, if you had a top scope structured fact like this in your manifest `$::my_structured_fact['foo']['test']`, lint would return an invalid correction when passed the fix flag. Now, we have altered the top_scope_facts plugin, to first check if it is a structured fact, and if one is found using regex, apply different logic to fix.
Prior to this commit, if you had a top scope structured fact like this in your manifest `$::my_structured_fact['foo']['test']`, lint would return an invalid correction when passed the fix flag. Now, we have altered the top_scope_facts plugin, to first check if it is a structured fact, and if one is found using regex, apply different logic to fix.
Prior to this commit, if you had a top scope structured fact like this in your manifest `$::my_structured_fact['foo']['test']`, lint would return an invalid correction when passed the fix flag. Now, we have altered the top_scope_facts plugin, to first check if it is a structured fact, and if one is found using regex, apply different logic to fix.
Prior to this commit, if you had a top scope structured fact like this in your manifest `$::my_structured_fact['foo']['test']`, lint would return an invalid correction when passed the fix flag. Now, we have altered the top_scope_facts plugin, to first check if it is a structured fact, and if one is found using regex, apply different logic to fix.
Prior to this commit, if you had a top scope structured fact like this in your manifest `$::my_structured_fact['foo']['test']`, lint would return an invalid correction when passed the fix flag. Now, we have altered the top_scope_facts plugin, to first check if it is a structured fact, and if one is found using regex, apply different logic to fix.
Prior to this commit, if you had a top scope structured fact like this in your manifest `$::my_structured_fact['foo']['test']`, lint would return an invalid correction when passed the fix flag. Now, we have altered the top_scope_facts plugin, to first check if it is a structured fact, and if one is found using regex, apply different logic to fix.
Prior to this commit, if you had a top scope structured fact like this in your manifest `$::my_structured_fact['foo']['test']`, lint would return an invalid correction when passed the fix flag. Now, we have altered the top_scope_facts plugin, to first check if it is a structured fact, and if one is found using regex, apply different logic to fix.
Prior to this commit, if you had a top scope structured fact like this in your manifest `$::my_structured_fact['foo']['test']`, lint would return an invalid correction when passed the fix flag. Now, we have altered the top_scope_facts plugin, to first check if it is a structured fact, and if one is found using regex, apply different logic to fix.
@jordanbreen28 Thank you! 🙏🏻 Not sure if I can test it quickly though.. |
Not too worry! Always like to get the stamp of approval but im fairly certain it fixes the issue at hand anyway, we will get this merged in and released some time this week. |
(GH-189) - invalid fact correction for top scope structured fact
@jay7x this was shipped as part of v1.5.2 of puppet-vscode :) |
@jordanbreen28 tyvm! Heading to try it later today! |
What Versions are you running?
OS Version: MacOS 14.2.1 (arm64)
VSCode Version: VSCodium Version: 1.85.2
Puppet Extension Version: v1.5.1 (from the open-vsx repo)
PDK Version: 3.0.1
What You Are Seeing?
Let's say I have the following example manifest with a (custom) top-level structured fact reference:
When I select "Format Document" from the context menu I got this:
As you may see it's wrong syntax and it breaks the future file checks and formatting.
What is Expected?
Though I'm not sure if it's easy to fix at all. So mostly leaving it here for your awareness.
The text was updated successfully, but these errors were encountered: