From 991d52f0193e0011fb8a2894dc23c1a34dcda425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Fri, 24 Jun 2022 11:36:54 +0200 Subject: [PATCH] Fix error reporting in 'make options' on OTP24+ --- tools/opt_types.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/opt_types.sh b/tools/opt_types.sh index 92cd943d8..71d69a5d4 100755 --- a/tools/opt_types.sh +++ b/tools/opt_types.sh @@ -483,8 +483,12 @@ options_required([Form]) -> proplists:get_value(required, Opts, []). format_file(Path, Form) -> + Line = case erl_syntax:get_pos(Form) of + {L, _} -> L; + L -> L + end, filename:rootname(filename:basename(Path)) ++ ".erl:" ++ - integer_to_list(erl_syntax:get_pos(Form)). + integer_to_list(Line). module(Path) -> list_to_atom(filename:rootname(filename:basename(Path))).