-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPSScriptAnalyzerSettings.psd1
79 lines (68 loc) · 2.33 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# PSScriptAnalyzer settings
#
# Last reviewed release: v1.22.0
@{
IncludeRules = @('*')
ExcludeRules = @(
'PSReviewUnusedParameter'
)
Rules = @{
# Compatibility rules
PSUseCompatibleSyntax = @{
Enable = $true
# Only major versions from v3.0 are supported
TargetVersions = @('5.0', '6.0', '7.0')
}
# General rules
PSAlignAssignmentStatement = @{
Enable = $true
CheckHashtable = $true
}
PSAvoidUsingPositionalParameters = @{
Enable = $true
CommandAllowList = @()
}
PSPlaceCloseBrace = @{
Enable = $true
IgnoreOneLineBlock = $true
NewLineAfter = $false
NoEmptyLineBefore = $false
}
PSPlaceOpenBrace = @{
Enable = $true
IgnoreOneLineBlock = $true
NewLineAfter = $true
OnSameLine = $true
}
PSProvideCommentHelp = @{
Enable = $true
BlockComment = $true
ExportedOnly = $true
Placement = 'begin'
VSCodeSnippetCorrection = $false
}
PSUseConsistentIndentation = @{
Enable = $true
IndentationSize = 4
Kind = 'space'
PipelineIndentation = 'IncreaseIndentationForFirstPipeline'
}
PSUseConsistentWhitespace = @{
Enable = $true
CheckInnerBrace = $true
CheckOpenBrace = $true
CheckOpenParen = $true
CheckOperator = $true
CheckParameter = $true
CheckPipe = $true
CheckPipeForRedundantWhitespace = $true
CheckSeparator = $true
IgnoreAssignmentOperatorInsideHashTable = $true
}
PSUseSingularNouns = @{
Enable = $true
# If unset, defaults to: Data, Windows
NounAllowList = @()
}
}
}