Build: v5.7.173
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.18363.0
Good evening
Unfortunately, Sapien PowerShell Studio has some annoying formatting issues.
Example #1: Please allow us to Select Upper Camel Case by default
This is an annoying fun: The code generator creates this code:
Code: Select all
foreach ($Item in $Collection) {
…
}
Code: Select all
ForEach ($Item in $Collection) {
…
}
This would help so that we don't deface the code of other developers when we work together.
Example #2: If above 'Else' is a comment, then please correctly indent the 'Else' keyword:
Code: Select all
If ($true) {
# Do we have a?
If ($obj -eq 'a') {
# Code
}
# Do we have b?
ElseIf ($obj -eq 'b') {
# Code
}
}
Example #3: Very bad code formatting for Param():
Sapien wastes many lines if the Param() lines are formatted. We prefer this - it's perfectly readable and we usually get the overview of all parameters without scrolling:
Code: Select all
[CmdletBinding()]
Param (
[Parameter(Position = 0, Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[String]$GroupName,
# Comment 1
[Switch]$Recursive = $true,
# Comment 2
[Switch]$SkipDisabledUsers
)
Code: Select all
[CmdletBinding()]
Param (
[Parameter(Position = 0, Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[String]$GroupName,
# Comment 1
[Switch]$Recursive = $true,
# Comment 2
[Switch]$SkipDisabledUsers
)
If you're not able to fix it:
Would it possibly be possible to integrate an external code formatting tool?
I don't know if there is a useful tool.
Thanks a lot, kind regards,
Thomas