FormatPowershellCode
FormatPowershellCode copied to clipboard
Format PowerShell code with PowerShell code
Hi Zachary Loeber, nice formatting script for Powershell. I just found a bug I guess. It would be great if you can fix that as comments shouldn't be deleted. I...
1. When importing the module downloaded from the PowerShell Gallery I received an error message pointing to the .psm1 file, therefore I replaced the root folder references (.\) with $PSScriptRoot...
Format-ScriptFormatCodeIndentation stops working after release building. It's related to the following code: ```powershell $AST = [System.Management.Automation.Language.Parser]::ParseInput($ScriptText, [ref]$Tokens, [ref]$ParseError) ``` It will be change after build process is run: ```powershell $AST...
Added code indentation for other types of enclosures, like @(), $(), (), []. It should make code easier for reading. For example the following flat code: ```powershell function Test{ param(...
I'm hoping that in the real world, your output is better than in the readme 😉 But in the readme you lost the newlines, _and_ you have one line that's...
Heya, I've written a script that looks at a directory and runs the formatter every second on all .ps1 files. When it came to this code, `Write-Host($subs | Format-Table -Property...