Commit 89b5212
authored
fix: parser correctness fixes (integer precision, nil safety, multi-variable lookup, type coercion, IfValue, XML duplicates) (#179)
* fix: preserve integer precision in YAML parser (UseNumber + normalizeYamlTypes)
* fix: multiple parser bugs
- UnmarshalJSON: guard against nil pointer panic on missing 'file'/'parser' keys
- LookupConfigurationValue: resolve each {{ config.x }} placeholder independently
so composite values like '{{ config.a }}:{{ config.b }}' expand correctly
- setValueWithSjson: drop implicit string→int coercion in default case to
preserve the original value type
- parseTextFile: honour if_value condition (was silently ignored before)
- parseXmlFile: remove existing attribute before CreateAttr to prevent
duplicates on repeated parses
* fix: address Copilot review comments1 parent a57491d commit 89b5212
2 files changed
Lines changed: 89 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 188 | + | |
193 | 189 | | |
194 | 190 | | |
195 | 191 | | |
| |||
208 | 204 | | |
209 | 205 | | |
210 | 206 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
226 | 211 | | |
| 212 | + | |
227 | 213 | | |
228 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
229 | 218 | | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
236 | 233 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
135 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
136 | 144 | | |
137 | 145 | | |
138 | 146 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
143 | 152 | | |
144 | 153 | | |
145 | 154 | | |
| |||
292 | 301 | | |
293 | 302 | | |
294 | 303 | | |
| 304 | + | |
295 | 305 | | |
296 | 306 | | |
297 | 307 | | |
| |||
462 | 472 | | |
463 | 473 | | |
464 | 474 | | |
465 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
466 | 478 | | |
467 | 479 | | |
| 480 | + | |
468 | 481 | | |
469 | 482 | | |
470 | 483 | | |
| |||
536 | 549 | | |
537 | 550 | | |
538 | 551 | | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
539 | 589 | | |
540 | 590 | | |
541 | 591 | | |
| |||
585 | 635 | | |
586 | 636 | | |
587 | 637 | | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
588 | 646 | | |
589 | 647 | | |
590 | 648 | | |
| |||
0 commit comments