@@ -5,8 +5,6 @@ BeforeAll {
5
5
$script :RuleName = ' PSUseCompatibleTypes'
6
6
}
7
7
8
- $script :TargetProfileConfigKey = ' TargetProfiles'
9
-
10
8
$script :Srv2012_3_profile = ' win-8_x64_6.2.9200.0_3.0_x64_4.0.30319.42000_framework'
11
9
$script :Srv2012r2_4_profile = ' win-8_x64_6.3.9600.0_4.0_x64_4.0.30319.42000_framework'
12
10
$script :Srv2016_5_profile = ' win-8_x64_10.0.14393.0_5.1.14393.2791_x64_4.0.30319.42000_framework'
@@ -79,11 +77,25 @@ Describe 'UseCompatibleTypes' {
79
77
Rules = @ {
80
78
$script :RuleName = @ {
81
79
Enable = $true
82
- $script :TargetProfileConfigKey = @ ($Target )
80
+ TargetProfiles = @ (
81
+ ' win-8_x64_6.2.9200.0_3.0_x64_4.0.30319.42000_framework'
82
+ ' win-8_x64_6.3.9600.0_4.0_x64_4.0.30319.42000_framework'
83
+ ' win-8_x64_10.0.14393.0_5.1.14393.2791_x64_4.0.30319.42000_framework'
84
+ ' win-8_x64_10.0.14393.0_6.2.4_x64_4.0.30319.42000_core'
85
+ ' win-8_x64_10.0.14393.0_7.0.0_x64_3.1.2_core'
86
+ ' win-8_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework'
87
+ ' win-8_x64_10.0.17763.0_6.2.4_x64_4.0.30319.42000_core'
88
+ ' win-8_x64_10.0.17763.0_7.0.0_x64_3.1.2_core'
89
+ ' win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework'
90
+ ' win-4_x64_10.0.18362.0_6.2.4_x64_4.0.30319.42000_core'
91
+ ' win-4_x64_10.0.18362.0_7.0.0_x64_3.1.2_core'
92
+ ' ubuntu_x64_18.04_6.2.4_x64_4.0.30319.42000_core'
93
+ ' ubuntu_x64_18.04_7.0.0_x64_3.1.2_core'
94
+ )
95
+ )
83
96
}
84
97
}
85
98
}
86
-
87
99
$diagnostics = Invoke-ScriptAnalyzer - IncludeRule $script :RuleName - ScriptDefinition $Script - Settings $settings
88
100
89
101
$diagnostics.Count | Should - Be $ProblemCount
@@ -104,7 +116,21 @@ Describe 'UseCompatibleTypes' {
104
116
Rules = @ {
105
117
$script :RuleName = @ {
106
118
Enable = $true
107
- $script :TargetProfileConfigKey = @ ($Target )
119
+ TargetProfiles = @ (
120
+ ' win-8_x64_6.2.9200.0_3.0_x64_4.0.30319.42000_framework'
121
+ ' win-8_x64_6.3.9600.0_4.0_x64_4.0.30319.42000_framework'
122
+ ' win-8_x64_10.0.14393.0_5.1.14393.2791_x64_4.0.30319.42000_framework'
123
+ ' win-8_x64_10.0.14393.0_6.2.4_x64_4.0.30319.42000_core'
124
+ ' win-8_x64_10.0.14393.0_7.0.0_x64_3.1.2_core'
125
+ ' win-8_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework'
126
+ ' win-8_x64_10.0.17763.0_6.2.4_x64_4.0.30319.42000_core'
127
+ ' win-8_x64_10.0.17763.0_7.0.0_x64_3.1.2_core'
128
+ ' win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework'
129
+ ' win-4_x64_10.0.18362.0_6.2.4_x64_4.0.30319.42000_core'
130
+ ' win-4_x64_10.0.18362.0_7.0.0_x64_3.1.2_core'
131
+ ' ubuntu_x64_18.04_6.2.4_x64_4.0.30319.42000_core'
132
+ ' ubuntu_x64_18.04_7.0.0_x64_3.1.2_core'
133
+ )
108
134
}
109
135
}
110
136
}
@@ -130,16 +156,18 @@ Describe 'UseCompatibleTypes' {
130
156
Rules = @ {
131
157
$script :RuleName = @ {
132
158
Enable = $true
133
- $script :TargetProfileConfigKey = @ (
134
- $script :Srv2012_3_profile
135
- $script :Srv2012r2_4_profile
136
- $script :Srv2016_5_profile
137
- $script :Srv2016_6_2_profile
138
- $script :Srv2019_5_profile
139
- $script :Srv2019_6_2_profile
140
- $script :Win10_5_profile
141
- $script :Win10_6_2_profile
142
- $script :Ubuntu1804_6_2_profile
159
+ TargetProfiles = @ (
160
+ ' win-8_x64_6.2.9200.0_3.0_x64_4.0.30319.42000_framework'
161
+ ' win-8_x64_6.2.9200.0_3.0_x64_4.0.30319.42000_framework'
162
+ ' win-8_x64_6.3.9600.0_4.0_x64_4.0.30319.42000_framework'
163
+ ' win-8_x64_10.0.14393.0_5.1.14393.2791_x64_4.0.30319.42000_framework'
164
+ ' win-8_x64_10.0.14393.0_6.2.4_x64_4.0.30319.42000_core'
165
+ ' win-8_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework'
166
+ ' win-8_x64_10.0.17763.0_6.2.4_x64_4.0.30319.42000_core'
167
+ ' win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework'
168
+ ' win-4_x64_10.0.18362.0_6.2.4_x64_4.0.30319.42000_core'
169
+ ' win-4_x64_10.0.18362.0_7.0.0_x64_3.1.2_core'
170
+ ' ubuntu_x64_18.04_6.2.4_x64_4.0.30319.42000_core'
143
171
)
144
172
}
145
173
}
@@ -163,18 +191,19 @@ Describe 'UseCompatibleTypes' {
163
191
Rules = @ {
164
192
$script :RuleName = @ {
165
193
Enable = $true
166
- $script :TargetProfileConfigKey = @ (
167
- $script :Srv2012_3_profile
168
- $script :Srv2012r2_4_profile
169
- $script :Srv2016_5_profile
170
- $script :Srv2016_6_2_profile
171
- $script :Srv2019_7_profile
172
- $script :Srv2019_5_profile
173
- $script :Srv2019_6_2_profile
174
- $script :Win10_5_profile
175
- $script :Win10_6_2_profile
176
- $script :Ubuntu1804_6_2_profile
177
- $script :Ubuntu1804_7_profile
194
+ TargetProfiles = @ (
195
+ ' win-8_x64_6.2.9200.0_3.0_x64_4.0.30319.42000_framework'
196
+ ' win-8_x64_6.2.9200.0_3.0_x64_4.0.30319.42000_framework'
197
+ ' win-8_x64_6.3.9600.0_4.0_x64_4.0.30319.42000_framework'
198
+ ' win-8_x64_10.0.14393.0_5.1.14393.2791_x64_4.0.30319.42000_framework'
199
+ ' win-8_x64_10.0.14393.0_6.2.4_x64_4.0.30319.42000_core'
200
+ ' win-8_x64_10.0.14393.0_7.0.0_x64_3.1.2_core'
201
+ ' win-8_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework'
202
+ ' win-8_x64_10.0.17763.0_6.2.4_x64_4.0.30319.42000_core'
203
+ ' win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework'
204
+ ' win-4_x64_10.0.18362.0_6.2.4_x64_4.0.30319.42000_core'
205
+ ' ubuntu_x64_18.04_6.2.4_x64_4.0.30319.42000_core'
206
+ ' ubuntu_x64_18.04_7.0.0_x64_3.1.2_core'
178
207
)
179
208
IgnoreTypes = @ (' System.IO.Compression.ZipFile' )
180
209
}
@@ -192,7 +221,7 @@ Describe 'UseCompatibleTypes' {
192
221
Rules = @ {
193
222
$script :RuleName = @ {
194
223
Enable = $true
195
- $ script :TargetProfileConfigKey = @ (
224
+ TargetProfiles = @ (
196
225
$script :AzF_profile
197
226
$script :AzA_profile
198
227
$script :Win10_5_profile
0 commit comments