summaryrefslogtreecommitdiff
path: root/check_xref
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-07-04 17:39:57 +0100
committerSimon MacMullen <simon@rabbitmq.com>2012-07-04 17:39:57 +0100
commit44a5aa0e9b97e1337a51eebb49aeaf4cd00e768a (patch)
tree300fc04a424591dc182522b000a985240512b7ac /check_xref
parente83681f08e6cd8e93024b1b342daa01102b276f7 (diff)
downloadrabbitmq-server-44a5aa0e9b97e1337a51eebb49aeaf4cd00e768a.tar.gz
Cosmetic: indulge bias against if statements.
Diffstat (limited to 'check_xref')
-rwxr-xr-xcheck_xref20
1 files changed, 10 insertions, 10 deletions
diff --git a/check_xref b/check_xref
index 382767bb..55458c66 100755
--- a/check_xref
+++ b/check_xref
@@ -70,14 +70,13 @@ check(Cwd, PluginsDir, LibDir, Checks) ->
ok = file:rename(UnpackDir, AppN),
code:add_patha(filename:join(AppN, "ebin")),
- if IsExternal =:= true ->
- App = list_to_atom(hd(string:tokens(filename:basename(AppN),
- "-"))),
- report(info, "loading ~p~n", [App]),
- application:load(App),
- store_third_party(App);
- true ->
- ok
+ case IsExternal of
+ true -> App = list_to_atom(hd(string:tokens(filename:basename(AppN),
+ "-"))),
+ report(info, "loading ~p~n", [App]),
+ application:load(App),
+ store_third_party(App);
+ _ -> ok
end
end || Plugin <- Plugins,
lists:suffix(".ez", Plugin)],
@@ -220,8 +219,9 @@ report(Results) ->
{Errors, Warnings} = partition(Results),
report(info, "Completed: ~p errors, ~p warnings~n",
[length(Errors), length(Warnings)]),
- if length(Errors) > 0 -> halt(1);
- true -> halt(0)
+ case length(Errors) > 0 of
+ true -> halt(1);
+ false -> halt(0)
end.
report_failures({analysis_error, {Mod, Reason}}) ->