Skip to content

Commit

Permalink
chore: move xref from rebar.config to code attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwencool committed Oct 22, 2024
1 parent 19b2011 commit a5a3582
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
{subpackages, false}
]}.
{xref_checks, [undefined_function_calls]}.
{xref_ignores, [{proc_lib, get_label, 1}]}.
{cover_enabled, true}.
{post_hooks, [{"(linux|darwin|solaris)", edoc, "escript doc/docsite.erl"}]}.

Expand Down
6 changes: 4 additions & 2 deletions src/observer_cli.erl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

-include("observer_cli.hrl").

%% proc_lib:get_label/1 is not exported before OTP 27
-dialyzer([{nowarn_function, [choose_lable/1]}]).
-ignore_xref({proc_lib, get_label, 1}).

%% API
-export([start/0]).
-export([start/1]).
Expand Down Expand Up @@ -782,8 +786,6 @@ choose_name(IsName) when is_atom(IsName) ->
choose_name(_) ->
undefined.

%% proc_lib:get_label/1 is not exported before OTP 27
-dialyzer([{nowarn_function, [choose_lable/1]}]).
choose_lable(Pid) ->
case
erlang:function_exported(proc_lib, get_label, 1) andalso
Expand Down

0 comments on commit a5a3582

Please sign in to comment.