Skip to content

Commit 2bfbd0f

Browse files
committed
Get back erl_tidy as a dependency when running "make xdata"
1 parent 440ba92 commit 2bfbd0f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ spec: src/xmpp_codec.erl include/xmpp_codec.hrl $(DEPDIR)/fast_xml/ebin/fxml_gen
2727
'case fxml_gen:compile("specs/xmpp_codec.spec", [{add_type_specs, xmpp_element}, {erl_dir, "src"}, {hrl_dir, "include"}]) of ok -> halt(0); _ -> halt(1) end.'
2828

2929
xdata: ebin/xdata_codec.beam
30+
ERLTIDY=true $(REBAR) compile
3031
$(ERL) -noinput +B -pa ebin -pa $(DEPDIR)/*/ebin -eval \
3132
'case xdata_codec:compile("specs", [{erl_dir, "src"}, {hrl_dir, "include"}]) of ok -> halt(0); _ -> halt(1) end.'
3233

rebar.config.script

+4
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ Rules = [
176176
AppendList([{coveralls, {git,
177177
"https://github.com/processone/coveralls-erl.git",
178178
{branch, "addjsonfile"}}} ]), []},
179+
{[deps], os:getenv("ERLTIDY") == "true",
180+
AppendList([{erl_tidy, {git,
181+
"https://github.com/richcarl/erl_tidy.git",
182+
{branch, "master"}}} ]), []},
179183
{[deps], os:getenv("USE_GLOBAL_DEPS") /= false,
180184
GlobalDepsFilter, []},
181185
{[erl_opts], true,

src/xdata_codec.erl

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ compile_element(#xmlel{name = <<"form_type">>, children = Els} = Form,
238238
mk_encoders(Fs, State),
239239
ErlData = get(outbuf),
240240
ok = file:write_file(filename:join(ErlDir, OutErl), ErlData),
241-
%% ok = erl_tidy:file(filename:join(ErlDir, OutErl),
242-
%% [{backups, false}, {keep_unused, true}]),
241+
ok = erl_tidy:file(filename:join(ErlDir, OutErl),
242+
[{backups, false}, {keep_unused, true}]),
243243
put(outbuf, []),
244244
mk_type_definitions(Fs, State),
245245
HrlData = get(outbuf),

0 commit comments

Comments
 (0)