Commit 2e528db
Extract normalize_arg_names() to simplify parametrize parsing (#532)
## Summary
- **Extracted `normalize_arg_names()`** from `parse_parametrize_args()`
to separate name normalization from value parsing. The new function
tries `Vec<String>` extraction first, then falls back to splitting a
comma-separated string.
- **Collapsed 3 parsing paths into 1.** Previously,
`parse_parametrize_args()` had three separate branches: (1) single
string with commas, (2) single string without commas, and (3)
`Vec<String>`. Each branch independently extracted values and hardcoded
`expect_multiple` as `true`, `false`, or `true` respectively. Now
`expect_multiple` is derived uniformly from `names.len() > 1`.
- **No behavior change.** The old paths already had `expect_multiple`
matching whether the name count was greater than 1 -- this refactor just
makes that relationship explicit and removes the redundant extraction
calls.
## Test plan
- [x] All 685 existing tests pass (`just test`)
- [x] All pre-commit checks pass (`uvx prek run -a`)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent bb35456 commit 2e528db
File tree
1 file changed
+28
-44
lines changed- crates/karva_test_semantic/src/extensions/tags
1 file changed
+28
-44
lines changedLines changed: 28 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
62 | 77 | | |
63 | 78 | | |
64 | 79 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
70 | 85 | | |
71 | 86 | | |
72 | 87 | | |
73 | 88 | | |
74 | 89 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
114 | 98 | | |
115 | 99 | | |
116 | 100 | | |
| |||
0 commit comments