Skip to content

Commit 02b5f35

Browse files
authored
Remove trailing whitespace (#3001)
1 parent f4f576c commit 02b5f35

File tree

1,394 files changed

+22628
-22629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,394 files changed

+22628
-22629
lines changed

build.psm1

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if ($IsLinux) {
3434
}
3535

3636
#
37-
# At the moment, we just support x64 builds. When we support x86 builds, this
37+
# At the moment, we just support x64 builds. When we support x86 builds, this
3838
# check may need to verify the SDK for the specified architecture.
3939
#
4040
function Get-Win10SDKBinDir {
@@ -120,7 +120,7 @@ function Start-PSBuild {
120120
Push-Location $PSScriptRoot
121121
try {
122122
git clean -fdX
123-
# Extra cleaning is required to delete the CMake temporary files.
123+
# Extra cleaning is required to delete the CMake temporary files.
124124
# These are not cleaned when using "X" and cause CMake to retain state, leading to
125125
# mis-configured environment issues when switching between x86 and x64 compilation
126126
# environments.
@@ -318,7 +318,7 @@ cmd.exe /C cd /d "$currentLocation" "&" "$($vcVarsPath)\vcvarsall.bat" "$NativeH
318318
# Describes wither it should build the CoreCLR or FullCLR version
319319
[ValidateSet("ON", "OFF")]
320320
[string]$OneCoreValue,
321-
321+
322322
# Array of file names to copy from the local build directory to the packaging directory
323323
[string[]]$FilesToCopy
324324
)
@@ -348,19 +348,19 @@ cmd.exe /C cd /d "$location" "&" "$($vcVarsPath)\vcvarsall.bat" "$NativeHostArch
348348
Copy-Item $srcPath $dstPath
349349
}
350350
}
351-
351+
352352
if ($FullCLR) {
353-
$fullBinaries = @(
353+
$fullBinaries = @(
354354
'powershell.exe',
355355
'powershell.pdb',
356356
'pwrshplugin.dll',
357357
'pwrshplugin.pdb'
358358
)
359-
Build-NativeWindowsBinaries "OFF" $fullBinaries
359+
Build-NativeWindowsBinaries "OFF" $fullBinaries
360360
}
361361
else
362362
{
363-
$coreClrBinaries = @(
363+
$coreClrBinaries = @(
364364
'pwrshplugin.dll',
365365
'pwrshplugin.pdb'
366366
)
@@ -405,7 +405,7 @@ cmd.exe /C cd /d "$location" "&" "$($vcVarsPath)\vcvarsall.bat" "$NativeHostArch
405405
# $Options.Output is pointing to something like "...\src\powershell-win-core\bin\Debug\netcoreapp1.1\win10-x64\publish\powershell.exe",
406406
# so we need to get its parent directory
407407
$publishPath = Split-Path $Options.Output -Parent
408-
log "Restore PowerShell modules to $publishPath"
408+
log "Restore PowerShell modules to $publishPath"
409409
# PowerShellGet depends on PackageManagement module, so PackageManagement module will be installed with the PowerShellGet module.
410410
Restore-PSModule -Name @('PowerShellGet') -Destination (Join-Path -Path $publishPath -ChildPath "Modules")
411411
}
@@ -417,11 +417,11 @@ function Compress-TestContent {
417417
$Destination
418418
)
419419

420-
$powerShellTestRoot = Join-Path $PSScriptRoot 'test\powershell'
420+
$powerShellTestRoot = Join-Path $PSScriptRoot 'test\powershell'
421421
Add-Type -AssemblyName System.IO.Compression.FileSystem
422422

423423
$resolvedPath = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Destination)
424-
[System.IO.Compression.ZipFile]::CreateFromDirectory($powerShellTestRoot, $resolvedPath)
424+
[System.IO.Compression.ZipFile]::CreateFromDirectory($powerShellTestRoot, $resolvedPath)
425425
}
426426

427427
function New-PSOptions {
@@ -718,7 +718,7 @@ function Start-PSPester {
718718
{
719719
$outputBufferFilePath = [System.IO.Path]::GetTempFileName()
720720
}
721-
721+
722722
$Command += "Invoke-Pester "
723723

724724
$Command += "-OutputFormat ${OutputFormat} -OutputFile ${OutputFile} "
@@ -784,7 +784,7 @@ function Start-PSPester {
784784
{
785785
Remove-Item $outputBufferFilePath
786786
}
787-
}
787+
}
788788
}
789789
if($ThrowOnFailure)
790790
{
@@ -819,7 +819,7 @@ function Show-PSPesterError
819819

820820
#
821821
# Read the test result file and
822-
# Throw if a test failed
822+
# Throw if a test failed
823823
function Test-PSPesterResults
824824
{
825825
param(
@@ -830,7 +830,7 @@ function Test-PSPesterResults
830830
if(!(Test-Path $TestResultsFile))
831831
{
832832
throw "Test result file '$testResultsFile' not found for $TestArea."
833-
}
833+
}
834834

835835
$x = [xml](Get-Content -raw $testResultsFile)
836836
if ([int]$x.'test-results'.failures -gt 0)
@@ -1204,7 +1204,7 @@ function Start-PSPackage {
12041204
[ValidateSet("deb", "osxpkg", "rpm", "msi", "appx", "zip")]
12051205
[string[]]$Type,
12061206

1207-
# Generate windows downlevel package
1207+
# Generate windows downlevel package
12081208
[ValidateSet("win81-x64", "win7-x86", "win7-x64")]
12091209
[ValidateScript({$IsWindows})]
12101210
[string]$WindowsDownLevel
@@ -1733,7 +1733,7 @@ function Start-DevPowerShell {
17331733
{
17341734
Remove-Item env:DEVPATH
17351735
}
1736-
1736+
17371737
if ($ZapDisable) {
17381738
Remove-Item env:COMPLUS_ZapDisable
17391739
}
@@ -2305,7 +2305,7 @@ function New-MSIPackage
23052305
{
23062306
[CmdletBinding()]
23072307
param (
2308-
2308+
23092309
# Name of the Product
23102310
[ValidateNotNullOrEmpty()]
23112311
[string] $ProductName = 'PowerShell',
@@ -2334,7 +2334,7 @@ function New-MSIPackage
23342334
# Path to Assets folder containing artifacts such as icons, images
23352335
[Parameter(Mandatory = $true)]
23362336
[ValidateNotNullOrEmpty()]
2337-
[string] $AssetsPath,
2337+
[string] $AssetsPath,
23382338

23392339
# Path to license.rtf file - for the EULA
23402340
[Parameter(Mandatory = $true)]
@@ -2364,16 +2364,16 @@ function New-MSIPackage
23642364

23652365
$ProductSemanticVersion = Get-PackageSemanticVersion -Version $ProductVersion
23662366
$ProductVersion = Get-PackageVersionAsMajorMinorBuildRevision -Version $ProductVersion
2367-
2367+
23682368
$assetsInSourcePath = Join-Path $ProductSourcePath 'assets'
23692369
New-Item $assetsInSourcePath -type directory -Force | Write-Verbose
23702370

2371-
Write-Verbose "Place dependencies such as icons to $assetsInSourcePath"
2371+
Write-Verbose "Place dependencies such as icons to $assetsInSourcePath"
23722372
Copy-Item "$AssetsPath\*.ico" $assetsInSourcePath -Force
2373-
2373+
23742374
$productVersionWithName = $ProductName + "_" + $ProductVersion
23752375
$productSemanticVersionWithName = $ProductName + "_" + $ProductSemanticVersion
2376-
2376+
23772377
Write-Verbose "Create MSI for Product $productSemanticVersionWithName"
23782378

23792379
[Environment]::SetEnvironmentVariable("ProductSourcePath", $ProductSourcePath, "Process")
@@ -2398,13 +2398,13 @@ function New-MSIPackage
23982398
if ($ProductNameSuffix) {
23992399
$packageName += "-$ProductNameSuffix"
24002400
}
2401-
$msiLocationPath = Join-Path $pwd "$packageName.msi"
2401+
$msiLocationPath = Join-Path $pwd "$packageName.msi"
24022402
Remove-Item -ErrorAction SilentlyContinue $msiLocationPath -Force
24032403

24042404
& $wixHeatExePath dir $ProductSourcePath -dr $productVersionWithName -cg $productVersionWithName -gg -sfrag -srd -scom -sreg -out $wixFragmentPath -var env.ProductSourcePath -v | Write-Verbose
24052405
& $wixCandleExePath "$ProductWxsPath" "$wixFragmentPath" -out (Join-Path "$env:Temp" "\\") -arch x64 -v | Write-Verbose
24062406
& $wixLightExePath -out $msiLocationPath $wixObjProductPath $wixObjFragmentPath -ext WixUIExtension -dWixUILicenseRtf="$LicenseFilePath" -v | Write-Verbose
2407-
2407+
24082408
Remove-Item -ErrorAction SilentlyContinue *.wixpdb -Force
24092409

24102410
Write-Verbose "You can find the MSI @ $msiLocationPath" -Verbose
@@ -2439,8 +2439,8 @@ function New-AppxPackage
24392439
[ValidateNotNullOrEmpty()]
24402440
[string] $AssetsPath
24412441
)
2442-
2443-
$PackageSemanticVersion = Get-PackageSemanticVersion -Version $PackageVersion
2442+
2443+
$PackageSemanticVersion = Get-PackageSemanticVersion -Version $PackageVersion
24442444

24452445
$PackageVersion = Get-PackageVersionAsMajorMinorBuildRevision -Version $PackageVersion
24462446
Write-Verbose "Package Version is $PackageVersion"
@@ -2527,7 +2527,7 @@ function New-ZipPackage
25272527
{
25282528
[CmdletBinding()]
25292529
param (
2530-
2530+
25312531
# Name of the Product
25322532
[ValidateNotNullOrEmpty()]
25332533
[string] $PackageName = 'PowerShell',
@@ -2547,12 +2547,12 @@ function New-ZipPackage
25472547
)
25482548

25492549
$ProductSemanticVersion = Get-PackageSemanticVersion -Version $PackageVersion
2550-
2550+
25512551
$zipPackageName = $PackageName + "_" + $ProductSemanticVersion
25522552
if ($PackageNameSuffix) {
25532553
$zipPackageName = $zipPackageName, $PackageNameSuffix -join "-"
25542554
}
2555-
2555+
25562556
Write-Verbose "Create Zip for Product $zipPackageName"
25572557

25582558
$zipLocationPath = Join-Path $PWD "$zipPackageName.zip"
@@ -2565,7 +2565,7 @@ function New-ZipPackage
25652565
$zipLocationPath
25662566

25672567
}
2568-
#TODO: Use .NET Api to do compresss-archive equivalent if the cmdlet is not present
2568+
#TODO: Use .NET Api to do compresss-archive equivalent if the cmdlet is not present
25692569
else
25702570
{
25712571
Write-Error -Message "Compress-Archive cmdlet is missing in this PowerShell version"
@@ -2755,7 +2755,7 @@ function Clear-PSRepo
27552755
[switch] $IncludePackages
27562756
)
27572757
Get-ChildItem $PSScriptRoot\* -Directory -Exclude 'Packages' | ForEach-Object {
2758-
Write-Verbose "Cleaning $_ ..."
2758+
Write-Verbose "Cleaning $_ ..."
27592759
git clean -fdX $_
27602760
}
27612761

@@ -2846,7 +2846,7 @@ function Restore-PSModule
28462846
# pull down the module
28472847
log "running save-module $_"
28482848
PowerShellGet\Save-Module @command -Force
2849-
2849+
28502850
# Remove PSGetModuleInfo.xml file
28512851
Find-Module -Name $_ -Repository $RepositoryName -IncludeDependencies | ForEach-Object {
28522852
Remove-Item -Path $Destination\$($_.Name)\*\PSGetModuleInfo.xml -Force

demos/Apache/Apache/Apache.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Class ApacheVirtualHost{
100100
$vHostDef += "</VirtualHost>"
101101
$filName = $ConfigurationFile
102102
$VhostDef | Out-File "/tmp/${filName}" -Force -Encoding:ascii
103-
& $global:sudocmd "mv" "/tmp/${filName}" "${VhostsDirectory}/${filName}"
103+
& $global:sudocmd "mv" "/tmp/${filName}" "${VhostsDirectory}/${filName}"
104104
Write-Information "Restarting Apache HTTP Server"
105105
Restart-ApacheHTTPServer
106106
}

demos/Azure/Azure-Demo.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ Login-AzureRmAccount
2020
$resourceGroupName = "PSAzDemo" + (New-Guid | % guid) -replace "-",""
2121
$resourceGroupName
2222

23-
### Create a new Azure Resource Group
23+
### Create a new Azure Resource Group
2424
New-AzureRmResourceGroup -Name $resourceGroupName -Location "West US"
2525

2626
### Deploy an Ubuntu 14.04 VM using Resource Manager cmdlets
27-
### Template is available at
27+
### Template is available at
2828
### http://armviz.io/#/?load=https:%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-vm-simple-linux%2Fazuredeploy.json
2929
$dnsLabelPrefix = $resourceGroupName | % tolower
3030
$dnsLabelPrefix
3131
$password = ConvertTo-SecureString -String "PowerShellRocks!" -AsPlainText -Force
3232
New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateFile ./Compute-Linux.json -adminUserName psuser -adminPassword $password -dnsLabelPrefix $dnsLabelPrefix
3333

3434
### Monitor the status of the deployment
35-
Get-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName
35+
Get-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName
3636

3737
### Discover the resources we created by the previous deployment
3838
Find-AzureRmResource -ResourceGroupName $resourceGroupName | select Name,ResourceType,Location
@@ -46,20 +46,20 @@ Get-AzureRmResource -ResourceName MyUbuntuVM -ResourceType Microsoft.Compute/vir
4646
Get-AzureRmProviderOperation -OperationSearchString Microsoft.Compute/* | select OperationName,Operation
4747

4848
### Power Off the Virtual Machine we created
49-
Invoke-AzureRmResourceAction -ResourceGroupName $resourceGroupName -ResourceType Microsoft.Compute/virtualMachines -ResourceName MyUbuntuVM -Action poweroff
49+
Invoke-AzureRmResourceAction -ResourceGroupName $resourceGroupName -ResourceType Microsoft.Compute/virtualMachines -ResourceName MyUbuntuVM -Action poweroff
5050

5151
### Check the VM state again. It should be stopped now.
5252
Get-AzureRmResource -ResourceName MyUbuntuVM -ResourceType Microsoft.Compute/virtualMachines -ResourceGroupName $resourceGroupName -ODataQuery '$expand=instanceView' | % properties | % instanceview | % statuses
5353

5454
### As you know, you may still be incurring charges even if the VM is in stopped state
5555
### Deallocate the resource to avoid this charge
56-
Invoke-AzureRmResourceAction -ResourceGroupName $resourceGroupName -ResourceType Microsoft.Compute/virtualMachines -ResourceName MyUbuntuVM -Action deallocate
56+
Invoke-AzureRmResourceAction -ResourceGroupName $resourceGroupName -ResourceType Microsoft.Compute/virtualMachines -ResourceName MyUbuntuVM -Action deallocate
5757

5858
### The following command removes the Virtual Machine
59-
Remove-AzureRmResource -ResourceName MyUbuntuVM -ResourceType Microsoft.Compute/virtualMachines -ResourceGroupName $resourceGroupName
59+
Remove-AzureRmResource -ResourceName MyUbuntuVM -ResourceType Microsoft.Compute/virtualMachines -ResourceGroupName $resourceGroupName
6060

6161
### Look at the resources that still exists
6262
Find-AzureRmResource -ResourceGroupName $resourceGroupName | select Name,ResourceType,Location
6363

6464
### Remove the resource group and its resources
65-
Remove-AzureRmResourceGroup -Name $resourceGroupName
65+
Remove-AzureRmResourceGroup -Name $resourceGroupName

demos/DSC/dsc-demo.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
#Get Distro type and set distro-specific variables
3-
$OSname = Get-Content "/etc/os-release" |Select-String -Pattern "^Name="
3+
$OSname = Get-Content "/etc/os-release" |Select-String -Pattern "^Name="
44
$OSName = $OSName.tostring().split("=")[1].Replace('"','')
55
if ($OSName -like "Ubuntu*"){
66
$distro = "Ubuntu"
@@ -56,12 +56,12 @@ Configuration ApacheServer{
5656

5757
nxFile Welcome.conf{
5858
DestinationPath = "${VhostDir}/welcome.conf"
59-
Ensure = "Absent"
59+
Ensure = "Absent"
6060
}
6161

6262
nxFile UserDir.conf{
6363
DestinationPath = "${VhostDir}/userdir.conf"
64-
Ensure = "Absent"
64+
Ensure = "Absent"
6565
}
6666

6767
#Ensure website is defined
@@ -107,8 +107,8 @@ ServerName $hostname
107107
Controller = $ServiceCtl
108108
DependsOn = "[nxFile]DefaultSite.conf"
109109
}
110-
111-
}
110+
111+
}
112112
}
113113

114114
ApacheServer -OutputPath "/tmp"

demos/crontab/CronTab/CronTab.ps1xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22

3-
<Configuration>
3+
<Configuration>
44
<ViewDefinitions>
55
<View>
66
<Name>Default</Name>

0 commit comments

Comments
 (0)