Commit 11bcdcb
fix: Fix version content validation loop logic and improve test coverage
- Fix critical indentation issue where version checking ran outside the test loop
- Remove redundant _check_version_content_format function for cleaner logic
- Ensure version content validation runs for each test individually
- Improve regex patterns with word boundaries for more precise hash detection
- Add comprehensive test coverage for SHA hashes, mixed scenarios, and edge cases
- All new tests now pass correctly after fixing the loop structure
Related to: nf-core/modules#6505
Fixed in: #3676
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent ff546d6 commit 11bcdcb
File tree
2 files changed
+39
-50
lines changed- nf_core/modules/lint
- tests/modules/lint
2 files changed
+39
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 18 | | |
43 | 19 | | |
44 | 20 | | |
| |||
215 | 191 | | |
216 | 192 | | |
217 | 193 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
224 | 201 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
234 | 205 | | |
| 206 | + | |
235 | 207 | | |
236 | 208 | | |
237 | 209 | | |
238 | 210 | | |
239 | 211 | | |
240 | 212 | | |
241 | 213 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
248 | 230 | | |
249 | | - | |
250 | 231 | | |
251 | 232 | | |
252 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
143 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
144 | 152 | | |
145 | 153 | | |
146 | 154 | | |
| |||
0 commit comments