Credo ratchet: promote structural checks into the gate #541
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
technical improvement
UX Improvement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: local-it/mitgliederverwaltung#541
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
The structural Credo checks that surfaced the refactoring backlog are still disabled in the gate
.credo.exs. Once therefactoring issues have reduced the violations, these checks should be promoted into the gate so the codebase
cannot regress. Two checks are already promoted by earlier issues (
Readability.StrictModuleLayoutin"Mechanical cleanup …",
Warning.UnsafeToAtomin "Correctness …"); this issue handles the remaining three.It must run last, after the god-module splits, so the violation counts are at their minimum.
Scope
mix credo --strict --config-file .pipeline/refactoring/baseline/credo.harvest.exs.credo.exsat the tightest threshold the post-refactor codealready passes (a ratchet floor, not necessarily the Credo default), then fix any small remaining residue to
hit that floor:
Design.DuplicatedCodeRefactor.ModuleDependencies(setmax_depsto the current max, e.g. 20, not the default 10 — many modulesbeyond the splits will still exceed 10)
Refactor.ABCSize.credo.exs, the intended downward tightening over time (e.g.max_deps20 → 15→ 10) so future work keeps ratcheting.
CREDO_RECOMMENDATION.md(e.g.Refactor.VariableRebinding,Readability.Specs) — include only if low-noise.Acceptance criteria
.credo.exsat a threshold the code passes;mix credo --strict(the gate) is green.
just ci-devgreen.Dependencies
Run after all god-module split issues (member_live/index, Member resource, Mv.Config + join workflow,
core_components, global_settings + fees_component) so the deps/ABC/duplication counts are at their minimum.