Skip to content

style: remove trailing whitespace and improve whitespace handling - #182

Merged
rulasg merged 3 commits into
mainfrom
remove-spaces
Jan 23, 2026
Merged

style: remove trailing whitespace and improve whitespace handling#182
rulasg merged 3 commits into
mainfrom
remove-spaces

Conversation

@rulasg

@rulasg rulasg commented Jan 23, 2026

Copy link
Copy Markdown
Owner

Improves code formatting by removing unnecessary whitespace and trailing empty lines across multiple scripts. This enhances code readability and consistency.

Commits included:

  • remove unnecessary whitespace in multiple scripts

  • improve whitespace removal script to remove tail empty lines

  • remove trailing whitespace from multiple scripts

# This addresses the PSAvoidTrailingWhitespace rule in PSScriptAnalyzer

Write-Host "Removing trailing whitespace from files..." -ForegroundColor Green
Write-Host "Removing trailing whitespace and trailing empty lines from files..." -ForegroundColor Green

Check warning

Code scanning / PSScriptAnalyzer

File 'remove-trailing-whitespace.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning

File 'remove-trailing-whitespace.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.
}

Write-Host "Done! Fixed trailing whitespace in $count files." -ForegroundColor Green
Write-Host "Done! Fixed trailing whitespace and empty lines in $count files." -ForegroundColor Green

Check warning

Code scanning / PSScriptAnalyzer

File 'remove-trailing-whitespace.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning

File 'remove-trailing-whitespace.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.
@rulasg
rulasg merged commit 84dd855 into main Jan 23, 2026
3 checks passed
@rulasg
rulasg deleted the remove-spaces branch January 23, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants