-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Expand file tree
/
Copy path.PSScriptAnalyzerSettings.psd1
More file actions
117 lines (107 loc) · 3.63 KB
/
.PSScriptAnalyzerSettings.psd1
File metadata and controls
117 lines (107 loc) · 3.63 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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
@{
Severity = @(
'Error'
'Warning'
'Information'
)
CustomRulePath = @(
'PSScriptAnalyzerCustomRules.psm1'
)
IncludeDefaultRules = $true
ExcludeRules = @(
# In an ideal world we'd keep this on and have people opt out on a variable
# by variable basis, but PSScriptAnalyzer does not have that degree of control.
'PSAvoidGlobalVars'
# Normally we'd disable this in-line, but there are issues with using inline
# diagnostic controls in pwsh_init_shell.ps1
'PSAvoidUsingWriteHost'
# TODO(CORE-2985): Evaluate if we want to turn this on.
# Disabling this for now, most of our Warp functions should not be invoked by
# users directly anyway.
'PSProvideCommentHelp'
)
Rules = @{
'Test-StringEscapeCode' = @{
Enable = $true
}
PSAvoidExclaimOperator = @{
Enable = $true
}
PSAvoidSemicolonsAsLineTerminators = @{
Enable = $true
}
PSAvoidUsingDoubleQuotesForConstantString = @{
Enable = $true
}
PSPlaceOpenBrace = @{
Enable = $true
OnSameLine = $true
NewLineAfter = $true
IgnoreOneLineBlock = $true
}
PSPlaceCloseBrace = @{
Enable = $true
NewLineAfter = $false
IgnoreOneLineBlock = $true
NoEmptyLineBefore = $false
}
PSUseConsistentIndentation = @{
Enable = $true
Kind = 'space'
PipelineIndentation = 'IncreaseIndentationForFirstPipeline'
IndentationSize = 4
}
PSUseConsistentWhitespace = @{
Enable = $true
CheckInnerBrace = $true
CheckOpenBrace = $false
CheckOpenParen = $false
CheckOperator = $false
CheckPipe = $true
CheckPipeForRedundantWhitespace = $false
CheckSeparator = $true
CheckParameter = $false
}
PSUseCorrectCasing = @{
Enable = $true
}
PSAlignAssignmentStatement = @{
Enable = $false
CheckHashtable = $false
}
PSUseCompatibleSyntax = @{
Enable = $true
TargetVersions = @('5.1', '6.2', '7.2')
}
PSUseCompatibleCommands = @{
Enable = $true
TargetProfiles = @(
# Windows 10 Powershell 5
'win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework'
# Windows 10 Powershell 6
'win-4_x64_10.0.18362.0_6.2.4_x64_4.0.30319.42000_core'
# Windows 10 Powershell 7
'win-4_x64_10.0.18362.0_7.0.0_x64_3.1.2_core'
# Ubuntu Powershell 6
'ubuntu_x64_18.04_6.2.4_x64_4.0.30319.42000_core'
# Ubuntu Powershell 7
'ubuntu_x64_18.04_7.0.0_x64_3.1.2_core'
)
}
PSUseCompatibleTypes = @{
Enable = $true
TargetProfiles = @(
# Windows 10 Powershell 5
'win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework'
# Windows 10 Powershell 6
'win-4_x64_10.0.18362.0_6.2.4_x64_4.0.30319.42000_core'
# Windows 10 Powershell 7
'win-4_x64_10.0.18362.0_7.0.0_x64_3.1.2_core'
# Ubuntu Powershell 6
'ubuntu_x64_18.04_6.2.4_x64_4.0.30319.42000_core'
# Ubuntu Powershell 7
'ubuntu_x64_18.04_7.0.0_x64_3.1.2_core'
)
}
}
}