-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPSScriptAnalyzerSettings.psd1
More file actions
33 lines (31 loc) 路 1.13 KB
/
Copy pathPSScriptAnalyzerSettings.psd1
File metadata and controls
33 lines (31 loc) 路 1.13 KB
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
@{
# The default rule set runs automatically. IncludeDefaultRules is intentionally not set:
# enabling it without a CustomRulePath triggers a NullReferenceException in some
# PSScriptAnalyzer versions. The formatting rules below are configured explicitly.
# Rules that do not fit this repo:
# - PSAvoidUsingWriteHost: the logger intentionally uses Write-Host for the
# information stream so CLI output is coloured and visible.
# - PSUseShouldProcessForStateChangingFunctions: many helpers are thin wrappers
# around external CLIs where ShouldProcess adds noise without value.
ExcludeRules = @(
'PSAvoidUsingWriteHost',
'PSUseShouldProcessForStateChangingFunctions'
)
Rules = @{
PSUseConsistentIndentation = @{
Enable = $true
Kind = 'space'
IndentationSize = 4
}
PSUseConsistentWhitespace = @{
Enable = $true
}
PSPlaceOpenBrace = @{
Enable = $true
OnSameLine = $true
}
PSPlaceCloseBrace = @{
Enable = $true
}
}
}