-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPSScriptAnalyzerSettings.psd1
More file actions
48 lines (44 loc) · 1.52 KB
/
Copy pathPSScriptAnalyzerSettings.psd1
File metadata and controls
48 lines (44 loc) · 1.52 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@{
# PSScriptAnalyzer configuration for this repository.
# Invoke with: Invoke-ScriptAnalyzer -Path . -Recurse -Settings ./PSScriptAnalyzerSettings.psd1
# Formatting can be applied with: Invoke-Formatter -Settings ./PSScriptAnalyzerSettings.psd1
# Fail CI on errors and warnings; informational findings stay advisory.
Severity = @('Error', 'Warning')
IncludeDefaultRules = $true
# Rules that are noisy for a personal automation repo, or handled elsewhere.
ExcludeRules = @(
'PSReviewUnusedParameter',
# Files are UTF-8 without BOM (correct for PowerShell 7 / cross-platform).
# This rule only matters for Windows PowerShell 5.1.
'PSUseBOMForUnicodeEncodedFile'
)
Rules = @{
# Enforce the house style (4-space indent, OTBS braces, aligned assignments).
PSPlaceOpenBrace = @{
Enable = $true
OnSameLine = $true
NewLineAfter = $true
}
PSPlaceCloseBrace = @{
Enable = $true
NewLineAfter = $true
}
PSUseConsistentIndentation = @{
Enable = $true
Kind = 'space'
IndentationSize = 4
}
PSUseConsistentWhitespace = @{
Enable = $true
}
PSUseCorrectCasing = @{
Enable = $true
}
# Every script/function must carry comment-based help.
PSProvideCommentHelp = @{
Enable = $true
ExportedOnly = $false
Placement = 'before'
}
}
}