From 7fd0c480bbfb4d08594e47e0ce86bed66fe3d15a Mon Sep 17 00:00:00 2001 From: Daniel Widgren Date: Tue, 10 Feb 2026 23:47:49 +0100 Subject: [PATCH] fix: remove @doc tags from callback declarations in nova_plugin edoc does not support @doc tags on -callback declarations, causing rebar3 ex_doc to fail with "tag @doc not allowed here" errors. Co-Authored-By: Claude Opus 4.6 --- src/nova_plugin.erl | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/nova_plugin.erl b/src/nova_plugin.erl index 042ab4b9..fd021485 100644 --- a/src/nova_plugin.erl +++ b/src/nova_plugin.erl @@ -34,26 +34,20 @@ {reply, Status :: integer(), Body :: binary()} | {reply, Status :: integer(), Headers :: [{binary(), binary()}], Body :: binary()}. -%% @doc %% Start function for the plugin. This function is called when the plugin is started %% and will return a state that will be passed to the other functions during %% the life cycle of the plugin. The state can be any term. -%% @end -callback init() -> State :: nova:state(). -optional_callbacks([init/0]). -%% @doc %% Stop function for the plugin. This function is called when the application is stopped. %% It takes a state as argument and should return ok. -%% @end -callback stop(State :: nova:state()) -> ok. -optional_callbacks([stop/1]). -%% @doc %% This function is called before the request is processed. It can modify the request %% and the nova-state. It takes a state and a map of options as arguments and should return %% either {ok, NewState}, {break, NewState}, {stop, NewState} or {error, Reason}. -%% @end -callback pre_request(Req :: cowboy_req:req(), Env :: any(), Options :: map(), PluginState :: any()) -> {ok, Req0 :: cowboy_req:req(), NewState :: any()} | @@ -65,12 +59,10 @@ {error, Reason :: term()}. -optional_callbacks([pre_request/4]). -%% @doc %% This function is called after the request is processed. It can modify the request. %% It takes a state and a map of options as arguments and should return %% either {ok, NewState}, {break, NewState}, {stop, NewState} or {error, Reason}. %% The state is only used if there's another plugin invoked after this one. -%% @end -callback post_request(Req :: cowboy_req:req(), Env :: any(), Options :: map(), PluginState :: any()) -> {ok, Req0 :: cowboy_req:req(), NewState :: any()} | @@ -82,10 +74,8 @@ {error, Reason :: term()}. -optional_callbacks([post_request/4]). -%% @doc %% This function should return information about the plugin. The information is used %% in the documentation and in the plugin-listing. -%% @end -callback plugin_info() -> #{title := binary(), version := binary(), url := binary(),