-
Notifications
You must be signed in to change notification settings - Fork 382
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
PSUseConsistentWhitespace is not consistent with hash @{} and array @() #1346
Comments
I agree that option 1 seems to be better. The formatting/style rules are all token based, therefore the fix might be as simple as making the rule aware of the 'type' of brace. I'd hope the rule already recognizes hashtables correctly, maybe it's just the special case of an empty hashtable that needs fixing. |
@bergmeister - we've just run into this over in the DSC Resource kit as well when implementing new hashtable style validation rules. The preferred style we'd like to be able to enforce/detect would be:
So, ideally being able to specify an option to include/exclude white space would be ideal. |
Apologies, this is caused by the new |
Thanks @bergmeister 🥇 |
Steps to reproduce
Simple example:
With a lint.psd1 of:
Execute
Expected behavior
I would expect
OR
I would prefer option 1.
Actual behavior
Environment data
The text was updated successfully, but these errors were encountered: