syntastic/syntax_checkers/erlang_check_file.erl
2012-10-17 13:09:26 -07:00

19 lines
684 B
Erlang
Executable File

#!/usr/bin/env escript
-export([main/1]).
main([FileName| LibDirs=[_|_]]) ->
code:add_pathsa(LibDirs),
main([FileName]);
main([FileName]) ->
compile:file(FileName, [warn_obsolete_guard,
warn_unused_import,
warn_shadow_vars,
warn_export_vars,
strong_validation,
report,
{i, filename:dirname(FileName) ++ "/../include"},
{i, filename:dirname(FileName) ++ "/../deps"},
{i, filename:dirname(FileName) ++ "/../../../deps"}
]).