fix: add @spec to all public functions across 24 modules (CSM-019)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-10 11:40:42 +02:00
parent 3f77488e33
commit b6f9cf58e1
24 changed files with 150 additions and 3 deletions

View File

@@ -3,8 +3,10 @@ defmodule BDS.UI.Registry do
use Gettext, backend: BDS.Gettext
@spec default_sidebar_view() :: atom()
def default_sidebar_view, do: :posts
@spec sidebar_views() :: [map()]
def sidebar_views do
[
%{
@@ -90,6 +92,7 @@ defmodule BDS.UI.Registry do
]
end
@spec editor_routes() :: [map()]
def editor_routes do
[
%{id: :dashboard, singleton: true, entity_tab: false, title: dgettext("ui", "Dashboard")},
@@ -138,6 +141,8 @@ defmodule BDS.UI.Registry do
]
end
@spec sidebar_view(atom()) :: map() | nil
def sidebar_view(id) when is_atom(id), do: Enum.find(sidebar_views(), &(&1.id == id))
@spec editor_route(atom()) :: map() | nil
def editor_route(id) when is_atom(id), do: Enum.find(editor_routes(), &(&1.id == id))
end