Skip to content

Commit 4759b5e

Browse files
authored
style(): Format files (#25)
Use the `Invoke-Formatter.ps1` script to format all the module's files.
1 parent 91ada06 commit 4759b5e

Some content is hidden

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

56 files changed

+333
-328
lines changed

WebKitDev/Functions/Expand-SourceArchive.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
.Example
2121
Expand-SourceArchive -Path foo.tar.gz -DestinationPath C:\foo.
2222
#>
23-
Function Expand-SourceArchive {
24-
Param(
23+
function Expand-SourceArchive {
24+
param(
2525
[Parameter(Mandatory)]
26-
[string] $path,
26+
[string]$path,
2727
[Parameter(Mandatory)]
28-
[string] $destinationPath
28+
[string]$destinationPath
2929
)
3030

3131
Write-Debug ('Getting information for archive {0}' -f $path);
@@ -35,7 +35,7 @@ Function Expand-SourceArchive {
3535

3636
# Determine if a nested call extraction is required
3737
$tempDir = '';
38-
if ($fileCount -eq 1 -And $files[0].FileName -eq '[no name]') {
38+
if ($fileCount -eq 1 -and $files[0].FileName -eq '[no name]') {
3939
# Expand to a temporary directory
4040
$tempDir = Join-Path ([System.IO.Path]::GetTempPath()) ([System.Guid]::NewGuid());
4141
Write-Debug ('Expanding nested archive to {0}' -f $tempDir);
@@ -45,7 +45,7 @@ Function Expand-SourceArchive {
4545
$path = (Get-ChildItem $tempDir)[0].FullName;
4646
}
4747

48-
Write-Debug ('Expanding archive {0} to {1}' -f $path, $destinationPath);
48+
Write-Debug ('Expanding archive {0} to {1}' -f $path,$destinationPath);
4949
Expand-7Zip -ArchiveFileName $path -TargetPath $destinationPath;
5050

5151
# Remove temporary directory and its contents if necessary

WebKitDev/Functions/Get-Font.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
# Get All Lucida Fonts
3030
Get-Font *Lucida*
3131
#>
32-
Function Get-Font {
33-
Param(
32+
function Get-Font {
33+
param(
3434
[Parameter()]
3535
$font = '*'
3636
)
3737

38-
if (-not ("Windows.Media.Fonts" -as [Type])) {
38+
if (-not ("Windows.Media.Fonts" -as [type])) {
3939
Add-Type -AssemblyName PresentationCore;
4040
}
4141

WebKitDev/Functions/Get-SourceCodeRelease.ps1

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@
1515
.Parameter DestinationPath
1616
The location to expand the source code to.
1717
#>
18-
Function Get-SourceCodeRelease {
19-
Param(
18+
function Get-SourceCodeRelease {
19+
param(
2020
[Parameter(Mandatory)]
21-
[string] $name,
21+
[string]$name,
2222
[Parameter(Mandatory)]
23-
[string] $url,
23+
[string]$url,
2424
[Parameter(Mandatory)]
25-
[string] $destinationPath
25+
[string]$destinationPath
2626
)
2727

28-
Write-Host ('Downloading {0} source code from {1} ...' -f $name, $url);
28+
Write-Host ('Downloading {0} source code from {1} ...' -f $name,$url);
2929
$extension = [System.IO.Path]::GetExtension($url);
30-
$fileName = [System.IO.Path]::GetTempFileName() | Rename-Item -NewName { $_ -replace '.tmp$', $extension } -PassThru;
31-
Invoke-WebFileRequest -Url $url -DestinationPath $fileName;
30+
$fileName = [System.IO.Path]::GetTempFileName() | Rename-Item -NewName { $_ -replace '.tmp$',$extension } -Passthru;
31+
Invoke-WebFileRequest -url $url -DestinationPath $fileName;
3232
Write-Host ('Downloaded {0} bytes' -f (Get-Item $fileName).Length);
3333

34-
Write-Host ('Unzipping {0} source code to {1} ...' -f $name, $destinationPath);
34+
Write-Host ('Unzipping {0} source code to {1} ...' -f $name,$destinationPath);
3535
Expand-SourceArchive -Path $fileName -DestinationPath $destinationPath;
3636

3737
# Clean up temporary files

WebKitDev/Functions/Get-VSBuildTools2015InstallationPath.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
1212
The path should be tested before using. No error checking is performed.
1313
#>
14-
Function Get-VSBuildTools2015InstallationPath {
14+
function Get-VSBuildTools2015InstallationPath {
1515
return 'C:\Program Files (x86)\Microsoft Visual Studio 14.0';
1616
}

WebKitDev/Functions/Get-VSBuildTools2015VCVarsAllPath.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
The path should be tested before attempting to call the executable. No error
1515
checking is performed.
1616
#>
17-
Function Get-VSBuildTools2015VCVarsAllPath {
17+
function Get-VSBuildTools2015VCVarsAllPath {
1818
return (Join-Path (Get-VSBuildTools2015InstallationPath) 'VC\vcvarsall.bat');
1919
}

WebKitDev/Functions/Get-VSBuildTools2017InstallationPath.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
The path should be tested before using. No error checking is performed.
1414
#>
15-
Function Get-VSBuildTools2017InstallationPath {
15+
function Get-VSBuildTools2017InstallationPath {
1616
$installs = Get-VSSetupInstance;
1717

1818
foreach ($install in $installs) {

WebKitDev/Functions/Get-VSBuildTools2017VCVarsAllPath.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
The path should be tested before attempting to call the executable. No error
1515
checking is performed.
1616
#>
17-
Function Get-VSBuildTools2017VCVarsAllPath {
17+
function Get-VSBuildTools2017VCVarsAllPath {
1818
return (Join-Path (Get-VSBuildTools2017InstallationPath) 'VC\Auxiliary\Build\vcvarsall.bat');
1919
}

WebKitDev/Functions/Get-VSBuildTools2019InstallationPath.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
The path should be tested before using. No error checking is performed.
1414
#>
15-
Function Get-VSBuildTools2019InstallationPath {
15+
function Get-VSBuildTools2019InstallationPath {
1616
$installs = Get-VSSetupInstance;
1717

1818
foreach ($install in $installs) {

WebKitDev/Functions/Get-VSBuildTools2019VCVarsAllPath.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
The path should be tested before attempting to call the executable. No error
1515
checking is performed.
1616
#>
17-
Function Get-VSBuildTools2019VCVarsAllPath {
17+
function Get-VSBuildTools2019VCVarsAllPath {
1818
return (Join-Path (Get-VSBuildTools2019InstallationPath) 'VC\Auxiliary\Build\vcvarsall.bat');
1919
}

WebKitDev/Functions/Get-VSBuildTools2022InstallationPath.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
The path should be tested before using. No error checking is performed.
1414
#>
15-
Function Get-VSBuildTools2022InstallationPath {
15+
function Get-VSBuildTools2022InstallationPath {
1616
$installs = Get-VSSetupInstance;
1717

1818
foreach ($install in $installs) {

0 commit comments

Comments
 (0)