Skip to content

Commit

Permalink
Normalisation script now trims trailing whitespace from lines
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSanderson committed Apr 13, 2012
1 parent ab31281 commit 8d7481a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/tools/normaliseAllFiles.ps1
Expand Up @@ -3,9 +3,9 @@
$allFiles = (Get-ChildItem -Path ..\..\ -Include *.js,*.css,*.bat -Recurse)

$allFiles | %{
# Read file, output back to file in CP1252 format (default for Git on Windows)
# Read file, remove trailing spaces/tabs, output back to file in CP1252 format (default for Git on Windows)
# This will also ensure the file has a trailing linebreak
Write-Host "Processing $_..."
$fileContent = Get-Content $_
$fileContent = (Get-Content $_) -replace "[ \t]+$", ""
[System.IO.File]::WriteAllLines($_, $fileContent, [System.Text.Encoding]::GetEncoding(1252))
}

0 comments on commit 8d7481a

Please sign in to comment.