Skip to content

Commit a3d5323

Browse files
committed
modules: powershell / ruby lint fixes
1 parent b3538a8 commit a3d5323

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

modules/BOSH.Account/BOSH.Account.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Describe "BOSH.Account" {
3131
}
3232

3333
BeforeEach {
34-
$userExists = !!(Get-LocalUser | Where { $_.Name -eq $user })
34+
$userExists = !!(Get-LocalUser | Where-Object { $_.Name -eq $user })
3535
if ($userExists)
3636
{
3737
Remove-LocalUser -Name $user

modules/BOSH.CFCell/BOSH.CFCell.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Describe "BOSH.CFCell" {
4343

4444
Protect-CFCell -IaaS "ignored"
4545

46-
Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" | select -exp fDenyTSConnections | Should -Be 1
46+
Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" | Select-Object -exp fDenyTSConnections | Should -Be 1
4747
netstat /p tcp /a | findstr ":3389 " | Should -BeNullOrEmpty
4848
Get-NetFirewallRule -DisplayName "Remote Desktop*" | ForEach-Object { $_.enabled | Should -Be "False" }
4949
Get-Service "Termservice" | Select-Object -exp starttype | Should -Be "Disabled"

modules/BOSH.SSH/BOSH.SSH.Tests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ BeforeAll {
5252

5353
mkdir "$dir\OpenSSH-Win64"
5454
$installSpyBehavior = "echo installed > $installScriptSpyStatus"
55-
echo $installSpyBehavior > "$dir\OpenSSH-Win64\install-sshd.ps1"
56-
echo "fake sshd" > "$dir\OpenSSH-Win64\sshd.exe"
57-
echo "fake config" > "$dir\OpenSSH-Win64\sshd_config_default"
55+
Write-Output $installSpyBehavior > "$dir\OpenSSH-Win64\install-sshd.ps1"
56+
Write-Output "fake sshd" > "$dir\OpenSSH-Win64\sshd.exe"
57+
Write-Output "fake config" > "$dir\OpenSSH-Win64\sshd_config_default"
5858

5959
Compress-Archive -Force -Path "$dir\OpenSSH-Win64" -DestinationPath $fakeZipPath
6060
}
@@ -79,7 +79,7 @@ Describe "BOSH.SSH" {
7979
CreateFakeOpenSSHZip -dir $TMP_DIR -installScriptSpyStatus $INSTALL_SCRIPT_SPY_STATUS -fakeZipPath $FAKE_ZIP
8080

8181
mkdir -p "$TMP_DIR\Windows\Temp"
82-
echo "fake LGPO" > "$TMP_DIR\Windows\LGPO.exe"
82+
Write-Output "fake LGPO" > "$TMP_DIR\Windows\LGPO.exe"
8383

8484
$ORIGINAL_WINDIR = $env:WINDIR
8585
$env:WINDIR = "$TMP_DIR\Windows"

modules/BOSH.Sysprep/print_conflicted_from_audit_csv.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ def self.from_string(s)
1717
AuditFile.new(header, contents)
1818
end
1919

20-
def print()
20+
def print
2121
([header] + contents).join("\r\n")
2222
end
2323

24-
def uniq()
24+
def uniq
2525
uniqed = contents.uniq do |x|
2626
values = x.split(',')
2727
keys = values[0..5].join('').downcase
@@ -32,7 +32,7 @@ def uniq()
3232
AuditFile.new(header, uniqed)
3333
end
3434

35-
def size()
35+
def size
3636
contents.size
3737
end
3838
end

modules/BOSH.WindowsUpdates/BOSH.WindowsUpdates.psm1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ function Install-WindowsUpdates
101101

102102
function Invoke-RebootOrComplete
103103
{
104-
$RegistryEntry = "InstallWindowsUpdates"
105104
switch ($script:RestartRequired)
106105
{
107106
0 {

0 commit comments

Comments
 (0)