Repository navigation
Commit 2d88fbd
committed
fix(cmd): keep runToolMultiService under the gocyclo budget
Making runToolFromCSV return an error (so the CSV purchase path is
unit-testable) added an `if err != nil { log.Fatalf }` branch to
runToolMultiService, pushing its cyclomatic complexity from 10 to 11 and
tripping the gocyclo pre-commit hook (over 10).
Extract the error-to-fatal glue into runCSVPathOrFatal so the entrypoint
drops back to complexity 10 while runToolFromCSV keeps its testable
error return.1 parent b0330f7 commit 2d88fbd
1 file changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 79 | + | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
| |||
258 | 256 | | |
259 | 257 | | |
260 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
261 | 269 | | |
262 | 270 | | |
263 | | - | |
| 271 | + | |
264 | 272 | | |
265 | 273 | | |
266 | 274 | | |
| |||
0 commit comments