PowerShellPracticeAndStyle icon indicating copy to clipboard operation
PowerShellPracticeAndStyle copied to clipboard

The Unofficial PowerShell Best Practices and Style Guide

Results 55 PowerShellPracticeAndStyle issues
Sort by recently updated
recently updated
newest added
trafficstars

I'm currently working on a internal style guide for new colleagues and got stuck while comparing the capitalization content. So I read the article and discussions here. And there is...

An idea would be to add a segment about module structuring like this: https://ramblingcookiemonster.github.io/Building-A-PowerShell-Module/

I'm tempted to create a function that does different things when the switch parameter is missing, true, and false. Using the 3 states cuts down on the number of switch...

enhancement
Best Practices
Help Wanted

There is currently a recommendation in [Function and Structure](https://github.com/PoshCode/PowerShellPracticeAndStyle/blob/master/Style%20Guide/Function%20Structure.md) to not use "return" but it says to "just put the variable on a line by itself" ... I wonder if...

Hello! This is such a great document! Thanks to all the community for putting it together. I am authoring a module that I'd like to be re-usable by others. This...

enhancement
Best Practices

The [Naming-Conventions](https://github.com/PoshCode/PowerShellPracticeAndStyle/blob/master/Style-Guide/Naming-Conventions.md) style guide has the following link which generates a 404 (page not found): [Expand-Alias](https://github.com/PoshCode/ModuleBuilder/blob/master/ResolveAlias.psm1)

I have some suggestions for improving "PERF-02 Consider trade-offs between performance and readability". I hope it's OK to group multiple "issues" here rather than spamming the Issues section. The first...

Does something like `gofmt` for golang or `terraform format` for Terraform exist for PowerShell? It would be awesome for VS code or PSScriptAnalyzer to auto enforce the standards and even...

What's the stance on the indentation on comment-based help? Personally, I left-align the comment-based help so I can get the most line length out of it, and I also try...

There's been some discussion recently about when it's appropriate to write errors ... 1. [A bug filed against `Get-TypeData`](https://github.com/PowerShell/PowerShell/issues/4235) 2. [The PR to fix the "bug"](https://github.com/PowerShell/PowerShell/pull/7434) 3. [A bug filed...

Best Practices
Discussion