Skip to content

Conversation

RylandDeGregory
Copy link

PR Summary

Fix default settings profiles by implementing @kapilmb's workaround in the original issue of disabling the CheckOperator attribute of PSUseConsistentWhitespace.

Also aligned the assignment statements within all the default settings profiles.

PR Checklist

@ghost
Copy link

ghost commented Jul 30, 2020

CLA assistant check
All CLA requirements met.

@RylandDeGregory
Copy link
Author

RylandDeGregory commented Jul 30, 2020

Seems as if the Pester tests are configured to where this can't possibly work. As both rules are being evaluated in different tests, they both need to be enabled.

I guess the actual issue is why the pester tests don't catch the issue that we (#769, #1460, #1490, #1556) have all been running into?

Copy link
Collaborator

@bergmeister bergmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this issue cannot be easily solved like that. For example, it would regress the behaviour of Invoke-Formatter -ScriptDefinition '$a=1' whereby at the moment it formats it to $a = 1 but with your change it would format to $a=1. Therefore this would not be acceptable to the majority of users. I suggest you create your custom settings file if that is what works for you in the meantime. We also had an alternative and preferred PR #1566 which looks very promising as it does not cause user regressions and will solve your issue and I am very positive that other PR will get merged, therefore expect the proper fix to be in the next version. Thank you for your efforts though.

@RylandDeGregory
Copy link
Author

RylandDeGregory commented Oct 24, 2020

I realized the same after doing some testing and running it through the Pester harness within this Repo. I'm glad it's finally being addressed though. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants