-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPSScriptAnalyzerSettings.psd1
More file actions
44 lines (34 loc) · 1.78 KB
/
PSScriptAnalyzerSettings.psd1
File metadata and controls
44 lines (34 loc) · 1.78 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
@{
ExcludeRules = @(
# Cosmetic only - trailing whitespace does not affect script behaviour
'PSAvoidTrailingWhitespace',
# Write-Host is appropriate in interactive console/profile scripts
'PSAvoidUsingWriteHost',
# Private helper functions in personal scripts are not exported module
# cmdlets, so approved-verb and singular-noun requirements do not apply
'PSUseApprovedVerbs',
'PSUseSingularNouns',
# Invoke-Expression is used for standard install patterns such as the
# Chocolatey bootstrap and oh-my-posh shell initialisation
'PSAvoidUsingInvokeExpression',
# UTF-8 without BOM is the preferred encoding for cross-platform scripts
'PSUseBOMForUnicodeEncodedFile',
# These are standalone scripts and git hooks, not reusable pipeline cmdlets
'PSUseShouldProcessForStateChangingFunctions',
'PSUseProcessBlockForPipelineCommand',
# Script-level variables ($UserBucket etc.) are intentionally shared
# across dot-sourced scripts and are not accidental globals
'PSAvoidGlobalVars',
# False positive: $Filter is used inside a pipeline Where-Object block
# that PSScriptAnalyzer cannot statically trace
'PSReviewUnusedParameter',
# Information level only; [OutputType] declarations are documentation
'PSUseOutputTypeCorrectly',
# Profile.ps1 uses intentionally empty catch blocks for TLS setup and
# mutex cleanup that must not interrupt an interactive shell session
'PSAvoidUsingEmptyCatchBlock',
# Third-party CLI wrappers (choco, scoop) use positional parameters
# by convention; enforcing named params here would be incorrect
'PSAvoidUsingPositionalParameters'
)
}