Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions FormatPowershellCode.psm1
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# This psm1 file is purely for development. The build script will recreate this file entirely.

# Private and other methods and variables
Get-ChildItem '.\src\private','.\src\other' -Recurse -Filter "*.ps1" -File | Sort-Object Name | Foreach {
Get-ChildItem "$PSScriptRoot\src\private","$PSScriptRoot\src\other" -Recurse -Filter "*.ps1" -File | Sort-Object Name | Foreach {
Write-Verbose "Dot sourcing private script file: $($_.Name)"
. $_.FullName
}

# Load and export public methods
Get-ChildItem '.\src\public' -Recurse -Filter "*.ps1" -File | Sort-Object Name | Foreach {
Get-ChildItem "$PSScriptRoot\src\public" -Recurse -Filter "*.ps1" -File | Sort-Object Name | Foreach {
Write-Verbose "Dot sourcing public script file: $($_.Name)"
. $_.FullName

Expand Down
3 changes: 1 addition & 2 deletions src/public/Format-ScriptFormatTypeNames.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@
($args[0] -is [System.Management.Automation.Language.TypeExpressionAst]) -or
($args[0] -is [System.Management.Automation.Language.TypeConstraintAst])
}
$types = $ast.FindAll($predicate, $true)
$types = $ast.FindAll($predicate, $true) | Where-Object { $_.TypeName.Name -ne 'ordered' }

for($t = $types.Count - 1; $t -ge 0; $t--) {
$type = $types[$t]

$typeName = $type.TypeName.Name
$extent = $type.TypeName.Extent
$FullTypeName = Invoke-Expression "$type"
Expand Down