-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPSScriptAnalyzerSettings.psd1
More file actions
39 lines (39 loc) · 1.25 KB
/
Copy pathPSScriptAnalyzerSettings.psd1
File metadata and controls
39 lines (39 loc) · 1.25 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
@{
# Core analysis rules
IncludeRules = @(
# Avoid problematic patterns
'PSAvoidGlobalAliases'
'PSAvoidUsingConvertToSecureStringWithPlainText'
'PSAvoidUsingInvokeExpression'
'PSAvoidUsingUsernameAndPasswordParams'
'PSUseBOMForUnicodeEncodedFile'
'PSUseCorrectCasing'
# Best practices
'PSProvideCommentHelp'
'PSReservedCmdletChar'
'PSReservedParams'
'PSUseApprovedVerbs'
'PSUseCmdletCorrectly'
'PSUseConsistentIndentation'
'PSUseConsistentWhitespace'
'PSUseDeclaredVarsMoreThanAssignments'
'PSUseSupportsShouldProcess'
'PSUseVerbosityForRequestedLevel'
)
# Rules to exclude (not applicable for this repo)
ExcludeRules = @(
# Exclude rule that requires OutputType for internal scripts
'PSUseOutputTypeCorrectly'
# Exclude WriteHost as it's widely used for colored output in scripts
'PSAvoidUsingWriteHost'
# Exclude unused parameter warnings for CLI scripts with optional params
'PSReviewUnusedParameter'
'PSAvoidUsingPositionalParameters'
'PSAvoidAssignmentToAutomaticVariable'
'PSUseSingularNouns'
'PSUseShouldProcessForStateChangingFunctions'
'PSAvoidUsingEmptyCatchBlock'
)
# Severity levels: Error, Warning, Information
Severity = 'Warning'
}