Skip to content

Commit b64d94f

Browse files
authored
Merge pull request #2884 from williamthome/wt/std-tpls-indent
Standardizes templates indentation
2 parents b28f3b5 + 1a29733 commit b64d94f

File tree

7 files changed

+73
-68
lines changed

7 files changed

+73
-68
lines changed

apps/rebar/priv/templates/app_rebar.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
{deps, []}.
33

44
{shell, [
5-
% {config, "config/sys.config"},
5+
%% {config, "config/sys.config"},
66
{apps, [{{name}}]}
77
]}.
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{erl_opts, [no_debug_info]}.
22
{deps, []}.
33

4-
{escript_incl_apps,
5-
[{{name}}]}.
4+
{escript_incl_apps, [{{name}}]}.
65
{escript_main_app, {{name}}}.
76
{escript_name, {{name}}}.
87
{escript_emu_args, "%%! +sbtu +A1\n"}.
98

10-
%% Profiles
11-
{profiles, [{test,
12-
[{erl_opts, [debug_info]}
13-
]}]}.
9+
{profiles, [
10+
{test, [
11+
{erl_opts, [debug_info]}
12+
]}
13+
]}.
+13-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{{=@@ @@=}}
2-
{application, @@name@@,
3-
[{description, "@@desc@@"},
4-
{vsn, "0.1.0"},
5-
{registered, []},
6-
{mod, {@@name@@_app, []}},
7-
{applications,
8-
[kernel,
9-
stdlib
10-
]},
11-
{env,[]},
12-
{modules, []},
13-
14-
{licenses, ["Apache-2.0"]},
15-
{links, []}
2+
{application, @@name@@, [
3+
{description, "@@desc@@"},
4+
{vsn, "0.1.0"},
5+
{registered, []},
6+
{mod, {@@name@@_app, []}},
7+
{applications, [
8+
kernel,
9+
stdlib
10+
]},
11+
{env, []},
12+
{modules, []},
13+
{licenses, ["Apache-2.0"]},
14+
{links, []}
1615
]}.
+12-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
{application, {{name}},
2-
[{description, "{{desc}}"},
3-
{vsn, "0.1.0"},
4-
{registered, []},
5-
{applications,
6-
[kernel,
7-
stdlib
8-
]},
9-
{env,[]},
10-
{modules, []},
11-
12-
{licenses, ["Apache-2.0"]},
13-
{links, []}
1+
{application, {{name}}, [
2+
{description, "{{desc}}"},
3+
{vsn, "0.1.0"},
4+
{registered, []},
5+
{applications, [
6+
kernel,
7+
stdlib
8+
]},
9+
{env, []},
10+
{modules, []},
11+
{licenses, ["Apache-2.0"]},
12+
{links, []}
1413
]}.

apps/rebar/priv/templates/provider.erl

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
1212
init(State) ->
1313
Provider = providers:create([
14-
{name, ?PROVIDER}, % The 'user friendly' name of the task
15-
{module, ?MODULE}, % The module implementation of the task
16-
{bare, true}, % The task can be run by the user, always true
17-
{deps, ?DEPS}, % The list of dependencies
18-
{example, "rebar3 {{name}}"}, % How to use the plugin
19-
{opts, []}, % list of options understood by the plugin
20-
{short_desc, "{{desc}}"},
21-
{desc, "{{desc}}"}
14+
{name, ?PROVIDER}, % The 'user friendly' name of the task
15+
{module, ?MODULE}, % The module implementation of the task
16+
{bare, true}, % The task can be run by the user, always true
17+
{deps, ?DEPS}, % The list of dependencies
18+
{example, "rebar3 {{name}}"}, % How to use the plugin
19+
{opts, []}, % list of options understood by the plugin
20+
{short_desc, "{{desc}}"},
21+
{desc, "{{desc}}"}
2222
]),
2323
{ok, rebar_state:add_provider(State, Provider)}.
2424

apps/rebar/priv/templates/relx_rebar.config

+28-23
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,37 @@
22
{erl_opts, [debug_info]}.
33
{deps, []}.
44

5-
{relx, [{release, {@@name@@, "0.1.0"},
6-
[@@name@@,
7-
sasl]},
5+
{relx, [
6+
{release, {@@name@@, "0.1.0"}, [
7+
@@name@@,
8+
sasl
9+
]},
810

9-
{mode, dev},
11+
{mode, dev},
1012

11-
%% automatically picked up if the files
12-
%% exist but can be set manually, which
13-
%% is required if the names aren't exactly
14-
%% sys.config and vm.args
15-
{sys_config, "./config/sys.config"},
16-
{vm_args, "./config/vm.args"}
13+
%% automatically picked up if the files
14+
%% exist but can be set manually, which
15+
%% is required if the names aren't exactly
16+
%% sys.config and vm.args
17+
{sys_config, "./config/sys.config"},
18+
{vm_args, "./config/vm.args"}
1719

18-
%% the .src form of the configuration files do
19-
%% not require setting RELX_REPLACE_OS_VARS
20-
%% {sys_config_src, "./config/sys.config.src"},
21-
%% {vm_args_src, "./config/vm.args.src"}
20+
%% the .src form of the configuration files do
21+
%% not require setting RELX_REPLACE_OS_VARS
22+
%% {sys_config_src, "./config/sys.config.src"},
23+
%% {vm_args_src, "./config/vm.args.src"}
2224
]}.
2325

24-
{profiles, [{prod, [{relx,
25-
[%% prod is the default mode when prod
26-
%% profile is used, so does not have
27-
%% to be explicitly included like this
28-
{mode, prod}
26+
{profiles, [
27+
%% prod is the default mode when prod
28+
%% profile is used, so does not have
29+
%% to be explicitly included like this
30+
{prod, [
31+
{relx, [
32+
{mode, prod}
2933

30-
%% use minimal mode to exclude ERTS
31-
%% {mode, minimal}
32-
]
33-
}]}]}.
34+
%% use minimal mode to exclude ERTS
35+
%% {mode, minimal}
36+
]}
37+
]}
38+
]}.

apps/rebar/priv/templates/sup.erl

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ start_link() ->
2727
%% type => worker(), % optional
2828
%% modules => modules()} % optional
2929
init([]) ->
30-
SupFlags = #{strategy => one_for_all,
31-
intensity => 0,
32-
period => 1},
30+
SupFlags = #{
31+
strategy => one_for_all,
32+
intensity => 0,
33+
period => 1
34+
},
3335
ChildSpecs = [],
3436
{ok, {SupFlags, ChildSpecs}}.
3537

0 commit comments

Comments
 (0)