Add code formatting option for lining up assignment operators in DSC configurations
See original GitHub issueWhen a user writes a DSC configuration, they might line up their assignment statements like this:
configuration MyConfiguration {
xDscWebService PSDSCPullServer {
Ensure = “Present”
EndpointName = “PSDSCPullServer”
Port = 8080
PhysicalPath = “$env:SystemDrive\inetpub\wwwroot\PSDSCPullServer”
CertificateThumbPrint = “AllowUnencryptedTraffic”
}
}
We should do this formatting for them so that when they add new properties they can reformat the configuration and have all the properties be lined up at the equal signs again.
/cc @jpsnover @smurawski
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:7
Top Results From Across the Web
Desired State Configuration for Azure overview - Microsoft Learn
Learn how to use the Microsoft Azure extension handler for PowerShell Desired State Configuration (DSC). The article includes prerequisites, ...
Read more >Code Layout and Formatting - PowerShell Practice and Style
Rules about indentation, line length, and capitalization are about consistency across code bases. Long practice has shown that it's easier to read and ......
Read more >PC1616/PC1832/PC1864 v4.6 NA - DSC
If the Command Output Code Required option is enabled, enter a valid user ... The keypad displays the information using a binary format,...
Read more >PowerShell DSC - how to pass configuration parameters to ...
SetScript = Format-DscScriptBlock -Node $Node -ScriptBlock ... because the -f operator requires the braces to contain an integer. Your code ...
Read more >Aligning code in columns with ReSharper and Rider
We can configure these options in ReSharper's settings under Code Editing | C# | Formatting Style | Tabs, Indents, Alignment, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@dotps1 we’ll definitely have an option to turn it off!
That’s a fair point, though I don’t see any way around this other than just turning off the rule if it’s problematic for you. Can you think of a better option?