Add dialyzer and resolve all findings closes #503 #504 #514 #516

Merged
moritz merged 16 commits from issue/mitgliederverwaltung-514 into main 2026-06-02 13:15:00 +02:00

16 commits

Author SHA1 Message Date
9a14cedc14 fix(repo): define all_tenants/0 as empty for non-multitenant schema
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/promote/production Build is passing
2026-06-02 12:26:35 +02:00
b5756d8e00 refactor(vereinfacht): gate retry skipping on runtime sandbox flag
The compile-time Mix.env() comparison folded to an always-false literal under analysis. sql_sandbox?/0 reads runtime config (true only in test) and works in releases where Mix is unavailable, preserving the fast-fail-no-retry behavior in tests.
2026-06-02 12:23:04 +02:00
a7ad608051 fix(auth): redirect a live-view socket in the user-required guard
LiveSession.assign_new_resources/2 is typed to return a Phoenix.Socket, which made the on_mount redirect type-incompatible. The authenticated-routes live_session already assigns current_user, so the guard reads it from socket.assigns directly. Also assign the locale into the socket actually used by the no-user redirect instead of discarding it.
2026-06-02 12:19:21 +02:00
6a4a99f638 refactor(types): drop guards and clauses that can never succeed 2026-06-02 12:11:59 +02:00
ec6422d450 fix(membership-fees): show error for unparseable cycle date instead of crashing
Date.from_iso8601/1 returns {:error, reason}, so the with else clause matching a bare :error never fired and an invalid date raised a WithClauseError. Match the real date/calendar error reasons so the user sees the validation message.
2026-06-02 12:08:19 +02:00
2db467d5d1 fix(pdf-export): match DateTime.from_iso8601 three-tuple when formatting cells
DateTime.from_iso8601/1 returns {:ok, datetime, offset}, so the two-tuple clauses never matched and datetime cells fell through to the naive-parse fallback. Matching the real shape routes them through the intended DateTime path; UTC values render identically.
2026-06-02 12:04:37 +02:00
c41d24113f fix(import): return readable string for unreadable upload errors
File.read/1 only yields posix atoms, so the File.Error and bare-reason branches were unreachable, and :file.format_error/1 returns a charlist rather than a String. Normalize the error to a binary so it interpolates correctly in flash messages.
2026-06-02 12:00:38 +02:00
05f66ccf74 refactor(types): remove dead catch-all clauses unreachable per success typing 2026-06-02 11:56:44 +02:00
d9a5a081df refactor(import): drop unreachable CSV error-formatting path
consume_and_read_csv/2 and MemberCSV.prepare/2 only ever return {:error, binary()}, so the non-binary error branch and the format_error_message/* helpers it called were unreachable. Removed them and bound the remaining discarded locale/dispatch results.
2026-06-02 11:50:43 +02:00
c0395f16e8 fix(types): resolve unknown type references in member and authorization specs 2026-06-02 11:46:54 +02:00
848f0cd013 refactor(types): bind intentionally discarded side-effecting results 2026-06-02 11:42:57 +02:00
04ab05f556 fix(member-export): forbid request without actor instead of falling through
The nil-actor guard used a one-armed if and continued into the export path regardless. The CheckPagePermission plug already halts unauthenticated requests before this controller runs, so the corrected early return preserves observable behavior while removing the dead fall-through. The export action is split into per-payload clauses so the guard reads as a flat early return.
2026-06-02 11:39:04 +02:00
5352a635c6 refactor(release): bind discarded results of side-effecting release tasks 2026-06-02 11:33:14 +02:00
fd8e6ac178 refactor(types): reconcile @specs with their success typings 2026-06-02 11:25:03 +02:00
263857ee26 feat(dialyzer): add typecheck stage to full CI pipelines
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is failing
2026-06-01 23:45:07 +02:00
ce57d046b9 ci(drone): run full test suite on main, tags and promote
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2026-06-01 22:59:05 +02:00