ansible-test - Update PSScriptAnalyzer to 1.21.0

pull/79280/head
Jordan Borean 2 years ago
parent bfcb557777
commit 4ad02dc6e3

@ -0,0 +1,4 @@
minor_changes:
- >-
ansible-test pslint - Upgrade PSScriptAnalyzer to ``1.21.0`` which enables the ``AvoidMultipleTypeAttributes``,
``AvoidSemicolonsAsLineTerminators``, and ``AvoidUsingBrokenHashAlgorithms`` rules

@ -28,8 +28,10 @@ Function Install-PSModule {
}
}
# Versions changes should be made first in ansible-test which is then synced to
# the default-test-container over time
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-PSModule -Name PSScriptAnalyzer -RequiredVersion 1.20.0
Install-PSModule -Name PSScriptAnalyzer -RequiredVersion 1.21.0
if ($IsContainer) {
# PSScriptAnalyzer contain lots of json files for the UseCompatibleCommands check. We don't use this rule so by

@ -1,37 +1,40 @@
@{
Rules = @{
PSAvoidLongLines = @{
Enable = $true
Rules = @{
PSAvoidLongLines = @{
Enable = $true
MaximumLineLength = 160
}
PSPlaceOpenBrace = @{
PSAvoidSemicolonsAsLineTerminators = @{
Enable = $true
OnSameLine = $true
}
PSPlaceOpenBrace = @{
Enable = $true
OnSameLine = $true
IgnoreOneLineBlock = $true
NewLineAfter = $true
NewLineAfter = $true
}
PSPlaceCloseBrace = @{
Enable = $true
PSPlaceCloseBrace = @{
Enable = $true
IgnoreOneLineBlock = $true
NewLineAfter = $true
NoEmptyLineBefore = $false
NewLineAfter = $true
NoEmptyLineBefore = $false
}
PSUseConsistentIndentation = @{
Enable = $true
IndentationSize = 4
PSUseConsistentIndentation = @{
Enable = $true
IndentationSize = 4
PipelineIndentation = 'IncreaseIndentationForFirstPipeline'
Kind = 'space'
Kind = 'space'
}
PSUseConsistentWhitespace = @{
Enable = $true
CheckInnerBrace = $true
CheckOpenBrace = $true
CheckOpenParen = $true
CheckOperator = $true
CheckPipe = $true
CheckPipeForRedundantWhitespace = $false
CheckSeparator = $true
CheckParameter = $false
PSUseConsistentWhitespace = @{
Enable = $true
CheckInnerBrace = $true
CheckOpenBrace = $true
CheckOpenParen = $true
CheckOperator = $true
CheckPipe = $true
CheckPipeForRedundantWhitespace = $false
CheckSeparator = $true
CheckParameter = $false
IgnoreAssignmentOperatorInsideHashTable = $false
}
}

Loading…
Cancel
Save