-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPSScriptAnalyzerSettings.psd1
48 lines (48 loc) · 1.5 KB
/
PSScriptAnalyzerSettings.psd1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Based on the `CodeFormatting.psd1` settings for PSScriptAnalyzer 1.21.0.
# https://github.com/PowerShell/PSScriptAnalyzer/blob/1.21.0/Engine/Settings/CodeFormatting.psd1
@{
IncludeRules = @(
'PSPlaceOpenBrace',
'PSPlaceCloseBrace',
'PSUseConsistentWhitespace',
'PSUseConsistentIndentation',
'PSAlignAssignmentStatement',
'PSUseCorrectCasing'
)
Rules = @{
PSAlignAssignmentStatement = @{
# Disable alignment of assignment statements.
Enable = $false
CheckHashtable = $true
}
PSPlaceOpenBrace = @{
Enable = $true
OnSameLine = $true
NewLineAfter = $true
IgnoreOneLineBlock = $true
}
PSUseConsistentIndentation = @{
Enable = $true
IndentationSize = 4
PipelineIndentation = 'IncreaseIndentationForFirstPipeline'
Kind = 'space'
}
PSUseConsistentWhitespace = @{
Enable = $true
CheckInnerBrace = $true
CheckOpenBrace = $true
CheckOpenParen = $true
CheckOperator = $true
CheckPipe = $true
# Check pipes.
CheckPipeForRedundantWhitespace = $true
CheckSeparator = $true
CheckParameter = $false
# Check hashtable.
IgnoreAssignmentOperatorInsideHashTable = $false
}
PSUseCorrectCasing = @{
Enable = $true
}
}
}