Commit e5ae9df
authored
Support SuggestedCorrections property on DiagnosticRecord for script based rules (#1000)
* Populate SuggestedCorrections when using scriptule and make it public for easier construction in PowerShell
* add documentation and test
* use [Type]::new() constructor instead of new-object
* Revert "use [Type]::new() constructor instead of new-object"
Reason: this was only introduced in PowerShell v5 and therefore fails
the PS v4 build and we should not give examples that do not work on any
supported version
This reverts commit aa90ea3.1 parent f1222ef commit e5ae9df
File tree
5 files changed
+47
-7
lines changed- Engine
- Generic
- Tests/Engine
- samplerule
5 files changed
+47
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1267 | 1267 | | |
1268 | 1268 | | |
1269 | 1269 | | |
| 1270 | + | |
1270 | 1271 | | |
1271 | 1272 | | |
1272 | 1273 | | |
| |||
1286 | 1287 | | |
1287 | 1288 | | |
1288 | 1289 | | |
| 1290 | + | |
1289 | 1291 | | |
1290 | 1292 | | |
1291 | 1293 | | |
| |||
1295 | 1297 | | |
1296 | 1298 | | |
1297 | 1299 | | |
1298 | | - | |
| 1300 | + | |
1299 | 1301 | | |
1300 | 1302 | | |
1301 | 1303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
64 | 85 | | |
65 | 86 | | |
66 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
152 | 165 | | |
153 | 166 | | |
154 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | | - | |
34 | | - | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
0 commit comments