diff options
author | Dave Smith <dizzyd@dizzyd.com> | 2010-10-10 13:30:44 -0600 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2010-10-10 13:30:44 -0600 |
commit | 93f77b50fc89690848a902428b38bcf5e21bfd7e (patch) | |
tree | de52782eec51dc4ce86be34f4e7969570da67b9c /src | |
parent | 1bf45036dc6b8c36f5ec96f02ab747d1736bddc3 (diff) |
Made OTP app module validation optional
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_otp_app.erl | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/rebar_otp_app.erl b/src/rebar_otp_app.erl index fd7b965..4cac897 100644 --- a/src/rebar_otp_app.erl +++ b/src/rebar_otp_app.erl @@ -35,7 +35,7 @@ %% Public API %% =================================================================== -compile(_Config, File) -> +compile(Config, File) -> %% If we get an .app.src file, it needs to be pre-processed and %% written out as a ebin/*.app file. That resulting file will then %% be validated as usual. @@ -50,7 +50,16 @@ compile(_Config, File) -> case rebar_app_utils:load_app_file(AppFile) of {ok, AppName, AppData} -> validate_name(AppName, AppFile), - validate_modules(AppName, proplists:get_value(modules, AppData)); + + %% In general, the list of modules is an important thing to validate + %% for compliance with OTP guidelines and upgrade procedures. However, + %% some people prefer not to validate this list. + case rebar_config:get_local(Config, validate_app_modules, true) of + true -> + validate_modules(AppName, proplists:get_value(modules, AppData)); + false -> + ok + end; {error, Reason} -> ?ABORT("Failed to load app file ~s: ~p\n", [AppFile, Reason]) end. |