瀏覽代碼

Merge pull request #1523 from mbeijen/separate

Typo: seperate -> separate
pull/1524/head
Fred Hebert 8 年之前
committed by GitHub
父節點
當前提交
e32cd3118f
共有 7 個檔案被更改,包括 42 行新增42 行删除
  1. +1
    -1
      manpages/rebar3.1
  2. +1
    -1
      priv/shell-completion/fish/rebar3.fish
  3. +1
    -1
      priv/shell-completion/zsh/_rebar3
  4. +25
    -25
      src/rebar_dialyzer_format.erl
  5. +8
    -8
      src/rebar_prv_common_test.erl
  6. +5
    -5
      src/rebar_prv_cover.erl
  7. +1
    -1
      src/rebar_prv_path.erl

+ 1
- 1
manpages/rebar3.1 查看文件

@ -197,7 +197,7 @@ Create new project from templates.
\fBpath\fR [\fI--app\fR] [\fI--base\fR] [\fI--bin\fR] [\fI--ebin\fR] [\fI--lib\fR] [\fI--priv\fR] [\fI-s\fR|\fI--separator\fR] [\fI--src\fR] [\fI--rel\fR]
Print paths to build dirs in current profile.
.IP
\fI--app\fR: Comma seperated list of applications to return paths for.
\fI--app\fR: Comma separated list of applications to return paths for.
.IP
\fI--base\fR: Return the `base' path of the current profile.
.IP

+ 1
- 1
priv/shell-completion/fish/rebar3.fish 查看文件

@ -147,7 +147,7 @@ complete -f -c 'rebar3' -n '__fish_rebar3_using_command new' -s f -l force -d "O
complete -f -c 'rebar3' -n '__fish_rebar3_using_command new' -a help -d "Display all variables and arguments for each template"
complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a paths -d "Print paths to build dirs in current profile."
complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -l app -d "Comma seperated list of applications to return paths for."
complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -l app -d "Comma separated list of applications to return paths for."
complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -l base -d "Return the `base` path of the current profile."
complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -l bin -d "Return the `bin` path of the current profile."
complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -l ebin -d "Return all `ebin` paths of the current profile`s applications."

+ 1
- 1
priv/shell-completion/zsh/_rebar3 查看文件

@ -110,7 +110,7 @@ _rebar3 () {
;;
(path)
_arguments \
'(--app)--app[Comma seperated list of applications to return paths for.]:apps' \
'(--app)--app[Comma separated list of applications to return paths for.]:apps' \
'(--base)--base[Return the `base` path of the current profile.]' \
'(--bin)--bin[Return the `bin` path of the current profile.]' \
'(--ebin)--ebin[Return all `ebin` paths of the current profile`s applications.]' \

+ 25
- 25
src/rebar_dialyzer_format.erl 查看文件

@ -370,7 +370,7 @@ good_arg(N, Args) ->
colour_arg(N, C, Args) when is_integer(N) ->
colour_arg([N], C, Args);
colour_arg(Ns, C, Args) ->
{Args1, Rest} =seperate_args(Args),
{Args1, Rest} =separate_args(Args),
Args2 = highlight(Ns, 1, C, Args1),
join_args(Args2) ++ Rest.
@ -388,43 +388,43 @@ highlight(Ns, N, C, [Arg | Rest]) ->
%% Arugments to functions and constraints are passed as
%% strings not as data, this function pulls them apart
%% to allow interacting with them seperately and not
%% to allow interacting with them separately and not
%% as one bug chunk of data.
seperate_args([$( | S]) ->
seperate_args([], S, "", []).
separate_args([$( | S]) ->
separate_args([], S, "", []).
%% We strip this space since dialyzer is inconsistant in adding or not adding
%% it ....
seperate_args([], [$,, $\s | R], Arg, Args) ->
seperate_args([], R, [], [lists:reverse(Arg) | Args]);
separate_args([], [$,, $\s | R], Arg, Args) ->
separate_args([], R, [], [lists:reverse(Arg) | Args]);
seperate_args([], [$, | R], Arg, Args) ->
seperate_args([], R, [], [lists:reverse(Arg) | Args]);
separate_args([], [$, | R], Arg, Args) ->
separate_args([], R, [], [lists:reverse(Arg) | Args]);
seperate_args([], [$) | Rest], Arg, Args) ->
separate_args([], [$) | Rest], Arg, Args) ->
{lists:reverse([lists:reverse(Arg) | Args]), Rest};
seperate_args([C | D], [C | R], Arg, Args) ->
seperate_args(D, R, [C | Arg], Args);
separate_args([C | D], [C | R], Arg, Args) ->
separate_args(D, R, [C | Arg], Args);
%% Brackets
seperate_args(D, [${ | R], Arg, Args) ->
seperate_args([$}|D], R, [${ | Arg], Args);
separate_args(D, [${ | R], Arg, Args) ->
separate_args([$}|D], R, [${ | Arg], Args);
seperate_args(D, [$( | R], Arg, Args) ->
seperate_args([$)|D], R, [$( | Arg], Args);
separate_args(D, [$( | R], Arg, Args) ->
separate_args([$)|D], R, [$( | Arg], Args);
seperate_args(D, [$[ | R], Arg, Args) ->
seperate_args([$]|D], R, [$[ | Arg], Args);
separate_args(D, [$[ | R], Arg, Args) ->
separate_args([$]|D], R, [$[ | Arg], Args);
seperate_args(D, [$< | R], Arg, Args) ->
seperate_args([$>|D], R, [$< | Arg], Args);
separate_args(D, [$< | R], Arg, Args) ->
separate_args([$>|D], R, [$< | Arg], Args);
%% 'strings'
seperate_args(D, [$' | R], Arg, Args) ->
seperate_args([$'|D], R, [$' | Arg], Args);
seperate_args(D, [$" | R], Arg, Args) ->
seperate_args([$"|D], R, [$" | Arg], Args);
separate_args(D, [$' | R], Arg, Args) ->
separate_args([$'|D], R, [$' | Arg], Args);
separate_args(D, [$" | R], Arg, Args) ->
separate_args([$"|D], R, [$" | Arg], Args);
seperate_args(D, [C | R], Arg, Args) ->
seperate_args(D, R, [C | Arg], Args).
separate_args(D, [C | R], Arg, Args) ->
separate_args(D, R, [C | Arg], Args).
join_args(Args) ->
[$(, string:join(Args, ", "), $)].

+ 8
- 8
src/rebar_prv_common_test.erl 查看文件

@ -708,17 +708,17 @@ maybe_write_coverdata(State) ->
rebar_prv_cover:maybe_write_coverdata(State1, ?PROVIDER).
ct_opts(_State) ->
[{dir, undefined, "dir", string, help(dir)}, %% comma-seperated list
{suite, undefined, "suite", string, help(suite)}, %% comma-seperated list
{group, undefined, "group", string, help(group)}, %% comma-seperated list
{testcase, undefined, "case", string, help(testcase)}, %% comma-seperated list
[{dir, undefined, "dir", string, help(dir)}, %% comma-separated list
{suite, undefined, "suite", string, help(suite)}, %% comma-separated list
{group, undefined, "group", string, help(group)}, %% comma-separated list
{testcase, undefined, "case", string, help(testcase)}, %% comma-separated list
{label, undefined, "label", string, help(label)}, %% String
{config, undefined, "config", string, help(config)}, %% comma-seperated list
{spec, undefined, "spec", string, help(spec)}, %% comma-seperated list
{config, undefined, "config", string, help(config)}, %% comma-separated list
{spec, undefined, "spec", string, help(spec)}, %% comma-separated list
{join_specs, undefined, "join_specs", boolean, help(join_specs)},
{allow_user_terms, undefined, "allow_user_terms", boolean, help(allow_user_terms)}, %% Bool
{logdir, undefined, "logdir", string, help(logdir)}, %% dir
{logopts, undefined, "logopts", string, help(logopts)}, %% comma seperated list
{logopts, undefined, "logopts", string, help(logopts)}, %% comma-separated list
{verbosity, undefined, "verbosity", integer, help(verbosity)}, %% Integer
{cover, $c, "cover", {boolean, false}, help(cover)},
{repeat, undefined, "repeat", integer, help(repeat)}, %% integer
@ -739,7 +739,7 @@ ct_opts(_State) ->
{name, undefined, "name", atom, help(name)},
{sname, undefined, "sname", atom, help(sname)},
{setcookie, undefined, "setcookie", atom, help(setcookie)},
{sys_config, undefined, "sys_config", string, help(sys_config)} %% comma-seperated list
{sys_config, undefined, "sys_config", string, help(sys_config)} %% comma-separated list
].
help(dir) ->

+ 5
- 5
src/rebar_prv_cover.erl 查看文件

@ -215,18 +215,18 @@ print_analysis(Analysis, true) ->
format_table(Stats, CoverFiles) ->
MaxLength = max(lists:foldl(fun max_length/2, 0, Stats), 20),
Header = header(MaxLength),
Seperator = seperator(MaxLength),
Separator = separator(MaxLength),
TotalLabel = format("total", MaxLength),
TotalCov = format(calculate_total(Stats), 8),
[io_lib:format("~ts~n~ts~n~ts~n", [Seperator, Header, Seperator]),
[io_lib:format("~ts~n~ts~n~ts~n", [Separator, Header, Separator]),
lists:map(fun({Mod, Coverage}) ->
Name = format(Mod, MaxLength),
Cov = format(Coverage, 8),
io_lib:format(" | ~ts | ~ts |~n", [Name, Cov])
end, Stats),
io_lib:format("~ts~n", [Seperator]),
io_lib:format("~ts~n", [Separator]),
io_lib:format(" | ~ts | ~ts |~n", [TotalLabel, TotalCov]),
io_lib:format("~ts~n", [Seperator]),
io_lib:format("~ts~n", [Separator]),
io_lib:format(" coverage calculated from:~n", []),
lists:map(fun(File) ->
io_lib:format(" ~ts~n", [File])
@ -242,7 +242,7 @@ max_length({ModName, _}, Min) ->
header(Width) ->
[" | ", format("module", Width), " | ", format("coverage", 8), " |"].
seperator(Width) ->
separator(Width) ->
[" |--", io_lib:format("~*c", [Width, $-]), "--|------------|"].
format(String, Width) -> io_lib:format("~*.ts", [Width, String]).

+ 1
- 1
src/rebar_prv_path.erl 查看文件

@ -118,7 +118,7 @@ path_opts(_State) ->
{src, undefined, "src", boolean, help(src)},
{rel, undefined, "rel", boolean, help(rel)}].
help(app) -> "Comma seperated list of applications to return paths for.";
help(app) -> "Comma separated list of applications to return paths for.";
help(base) -> "Return the `base' path of the current profile.";
help(bin) -> "Return the `bin' path of the current profile.";
help(ebin) -> "Return all `ebin' paths of the current profile's applications.";

Loading…
取消
儲存