-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPSScriptAnalyzerSettings.psd1
93 lines (93 loc) · 2.89 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@{
IncludeRules = @(
'PSAlignAssignmentStatement',
'PSAvoidDefaultValueSwitchParameter',
'PSAvoidGlobalVars',
'PSAvoidUsingCmdletAliases',
'PSAvoidUsingComputerNameHardcoded',
'PSAvoidUsingConvertToSecureStringWithPlainText',
'PSAvoidUsingEmptyCatchBlock',
'PSAvoidUsingInvokeExpression',
'PSAvoidUsingPlainTextForPassword',
'PSAvoidUsingPositionalParameters',
'PSAvoidUsingUserNameAndPasswordParams',
'PSAvoidUsingWMICmdlet',
'PSMissingModuleManifestField',
'PSPlaceCloseBrace',
'PSPlaceOpenBrace',
'PSProvideCommentHelp',
'PSReservedCmdletChar',
'PSReservedParams',
'PSShouldProcess',
'PSUseApprovedVerbs',
'PSUseCmdletCorrectly',
'PSUseCompatibleCommands',
'PSUseCompatibleSyntax',
'PSUseCompatibleTypes',
'PSUseConsistentIndentation',
'PSUseConsistentWhitespace',
'PSUseCorrectCasing',
'PSUseDeclaredVarsMoreThanAssignments',
'PSUsePSCredentialType',
'PSUseShouldProcessForStateChangingFunctions',
'PSUseSingularNouns',
'PSDSC*'
)
Rules = @{
PSAlignAssignmentStatement = @{
CheckHashtable = $true
Enable = $true
}
PSPlaceCloseBrace = @{
Enable = $true
IgnoreOneLineBlock = $true
NewLineAfter = $true
NoEmptyLineBefore = $false
}
PSPlaceOpenBrace = @{
Enable = $true
IgnoreOneLineBlock = $true
NewLineAfter = $true
OnSameLine = $true
}
PSUseCompatibleCommmands = @{
Enable = $true
TargetProfiles = @(
'win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework'
'win-48_x64_10.0.17763.0_6.1.3_x64_4.0.30319.42000_core'
)
}
PSUseCompatibleSyntax = @{
Enable = $true
TargetVersions = @(
'5.1',
'6.2'
)
}
PSUseCompatibleTypes = @{
Enable = $true
TargetProfiles = @(
'win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework'
'win-48_x64_10.0.17763.0_6.1.3_x64_4.0.30319.42000_core'
)
}
PSUseConsistentIndentation = @{
Enable = $true
IndentationSize = 4
Kind = 'space'
PipelineIndentation = 'IncreaseIndentationForFirstPipeline'
}
PSUseConsistentWhitespace = @{
CheckInnerBrace = $true
CheckOpenBrace = $true
CheckOpenParen = $true
CheckOperator = $true
CheckPipe = $true
CheckSeparator = $true
Enable = $true
}
PSUseCorrectCasing = @{
Enable = $true
}
}
}