Currently, default_formatter formats this code, when sort_function_exports is set to true…
%% assuming both the types and functions exist
-export_type([type_c/0, type_a/0, type_b/0, a_first_type/0]).
-export([b_fun/0, a_fun/0]).
-optional_callbacks([d_fun/0, c_fun/0]).
…like this…
%% only the export attribute is sorted
-export_type([type_c/0, type_a/0, type_b/0, a_first_type/0]).
-export([a_fun/0, b_fun/0]).
-optional_callbacks([d_fun/0, c_fun/0]).
It would be nice if the formatter were able to format (sort) other attributes than -export lists, as long as said attributes only contain arity qualifiers (e.g., -dialyzer([{nowarn_function, a_fun/0}, no_return]). should not be formatted (sorted)).
Currently,
default_formatter
formats this code, whensort_function_exports
is set totrue
……like this…
I would like it to be formatted like this…
It would be nice if the formatter were able to format (sort) other attributes than
-export
lists, as long as said attributes only contain arity qualifiers (e.g.,-dialyzer([{nowarn_function, a_fun/0}, no_return]).
should not be formatted (sorted)).