File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ Describe "Settings Class" {
79
79
$settings.RuleArguments [" PSAvoidUsingCmdletAliases" ][" WhiteList" ][1 ] | Should Be " cp"
80
80
}
81
81
82
- It " Should be case insesitive " {
82
+ It " Should be case insensitive " {
83
83
$settings.RuleArguments [" psAvoidUsingCmdletAliases" ][" whiteList" ].Count | Should Be 2
84
84
$settings.RuleArguments [" psAvoidUsingCmdletAliases" ][" whiteList" ][0 ] | Should Be " cd"
85
85
$settings.RuleArguments [" psAvoidUsingCmdletAliases" ][" whiteList" ][1 ] | Should Be " cp"
@@ -93,15 +93,23 @@ Describe "Settings Class" {
93
93
}
94
94
95
95
It " Should return 2 IncludeRules" {
96
- $settings.IncludeRules.Count | Should Be 2
96
+ $settings.IncludeRules.Count | Should Be 3
97
97
}
98
98
99
99
It " Should return 2 ExcludeRules" {
100
100
$settings.ExcludeRules.Count | Should Be 3
101
101
}
102
102
103
103
It " Should return 1 rule argument" {
104
- $settings.RuleArguments.Count | Should Be 1
104
+ $settings.RuleArguments.Count | Should Be 2
105
+ }
106
+
107
+ It " Should parse boolean type argument" {
108
+ $settings.RuleArguments [" PSUseConsistentIndentation" ][" Enable" ] | Should Be $true
109
+ }
110
+
111
+ It " Should parse int type argument" {
112
+ $settings.RuleArguments [" PSUseConsistentIndentation" ][" IndentationSize" ] | Should Be 4
105
113
}
106
114
}
107
115
}
Original file line number Diff line number Diff line change 1
1
@ {
2
- " IncludeRules" = @ (" PSAvoidUsingCmdletAliases" , " PSAvoidUsingWriteHost" )
2
+ " IncludeRules" = @ (" PSAvoidUsingCmdletAliases" , " PSAvoidUsingWriteHost" , " PSUseConsistentIndentation " )
3
3
" ExcludeRules" = @ (" PSShouldProcess" , " PSAvoidUsingWMICmdlet" , " PSUseCmdletCorrectly" )
4
4
" rules" = @ {
5
5
PSAvoidUsingCmdletAliases = @ {
6
6
WhiteList = @ (" cd" , " cp" )
7
7
}
8
+
9
+ PSUseConsistentIndentation = @ {
10
+ Enable = $true
11
+ IndentationSize = 4
12
+ }
8
13
}
9
14
}
You can’t perform that action at this time.
0 commit comments