mirror of
https://github.com/ansible/ansible.git
synced 2026-08-03 08:03:05 +02:00
ansible-test - Update PSScriptAnalyzer to 1.21.0
This commit is contained in:
@@ -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
|
||||
IgnoreOneLineBlock = $true
|
||||
NewLineAfter = $true
|
||||
}
|
||||
PSPlaceCloseBrace = @{
|
||||
Enable = $true
|
||||
PSPlaceOpenBrace = @{
|
||||
Enable = $true
|
||||
OnSameLine = $true
|
||||
IgnoreOneLineBlock = $true
|
||||
NewLineAfter = $true
|
||||
NoEmptyLineBefore = $false
|
||||
NewLineAfter = $true
|
||||
}
|
||||
PSUseConsistentIndentation = @{
|
||||
Enable = $true
|
||||
IndentationSize = 4
|
||||
PSPlaceCloseBrace = @{
|
||||
Enable = $true
|
||||
IgnoreOneLineBlock = $true
|
||||
NewLineAfter = $true
|
||||
NoEmptyLineBefore = $false
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user