Commit 2300747
fix(gep-validator): clean up Credo --strict findings after GEP-12 flip
GEP-12 commit 3dc1f9a enabled `Credo.Check.Warning.UnsafeToAtom` but
left 7 pre-existing Credo findings in the GEP validator that hadn't
tripped the previous disabled config. Most Credo categories exit
non-zero individually under --strict (refactor-opportunities = exit
code 8), which GitHub Actions treats as a failing step even when the
local `mix credo --strict` exits 0. CI went red on e3122f7.
Findings fixed:
lib/gep/validator.ex
- `unless X do ... else ...` → `if X do ... else ...`
(2 sites: check_history_entries :314, check_readme_index :589).
- Nested-too-deep reduce bodies (2 sites in check_bidirectional)
extracted into `check_superseded_by/4` and `check_back_ref/4`
helpers. Added `nil`-head clauses for the "referenced GEP doesn't
exist in number_map" case so the call site doesn't carry the
nil-check.
- Credo's "avoid negated conditions in if-else" flagged `not in
back_refs` — inverted the branches, kept the detail-building arm
as the else clause.
test/gep/validator_test.exs
- `Enum.map(coll, f) |> Enum.join(sep)` → `Enum.map_join(coll, sep, f)`
at 3 call sites in `build_frontmatter/1`. Zero semantic change.
Verification
------------
- `mix format --check-formatted` — clean.
- `mix compile --warnings-as-errors` — clean.
- `mix credo --strict` — exit 0, 0 findings. (Was exit 8 before.)
- `mix test --exclude inotify` — 588 tests, 0 failures.
- `mix test test/gep/validator_test.exs` — 27 tests, 0 failures.
- `mix gep.validate` — all 12 GEPs green.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e3122f7 commit 2300747
2 files changed
Lines changed: 57 additions & 59 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
315 | 317 | | |
316 | 318 | | |
317 | 319 | | |
| |||
320 | 322 | | |
321 | 323 | | |
322 | 324 | | |
323 | | - | |
324 | | - | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
| 495 | + | |
515 | 496 | | |
516 | 497 | | |
517 | 498 | | |
518 | 499 | | |
519 | 500 | | |
520 | 501 | | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
| 502 | + | |
543 | 503 | | |
544 | 504 | | |
545 | 505 | | |
| |||
551 | 511 | | |
552 | 512 | | |
553 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
| 589 | + | |
598 | 590 | | |
599 | 591 | | |
600 | 592 | | |
| |||
673 | 665 | | |
674 | 666 | | |
675 | 667 | | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
473 | | - | |
| 473 | + | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
477 | 476 | | |
478 | 477 | | |
479 | 478 | | |
| |||
484 | 483 | | |
485 | 484 | | |
486 | 485 | | |
487 | | - | |
| 486 | + | |
488 | 487 | | |
489 | 488 | | |
490 | | - | |
| 489 | + | |
491 | 490 | | |
492 | 491 | | |
493 | 492 | | |
494 | 493 | | |
495 | 494 | | |
496 | 495 | | |
497 | | - | |
498 | 496 | | |
499 | 497 | | |
500 | 498 | | |
| |||
0 commit comments