From a5a35823f5c9646b945355c5ebf0f9b1c9d60744 Mon Sep 17 00:00:00 2001 From: zhongwencool Date: Tue, 22 Oct 2024 11:03:26 +0800 Subject: [PATCH] chore: move xref from rebar.config to code attribute --- rebar.config | 1 - src/observer_cli.erl | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rebar.config b/rebar.config index 3f7fa9a..6aaf5e9 100644 --- a/rebar.config +++ b/rebar.config @@ -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"}]}. diff --git a/src/observer_cli.erl b/src/observer_cli.erl index c47d404..594d195 100644 --- a/src/observer_cli.erl +++ b/src/observer_cli.erl @@ -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]). @@ -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