Merge pull request #380 from kasyaar/erlang-checker-improvements
add possibility to add specific compile instruction
This commit is contained in:
commit
ba17657bc4
@ -15,11 +15,16 @@ endif
|
|||||||
let loaded_erlang_syntax_checker = 1
|
let loaded_erlang_syntax_checker = 1
|
||||||
|
|
||||||
"bail if the user doesnt have escript installed
|
"bail if the user doesnt have escript installed
|
||||||
if !executable("escript")
|
if !executable("erl")
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let s:check_file = expand('<sfile>:p:h') . '/erlang_check_file.erl'
|
"g:syntastic_erlc_attrs currently need to set in .vimrc
|
||||||
|
"TODO: make g:syntastic_erlc_attrs project specific
|
||||||
|
if !exists("g:syntastic_erlc_attrs")
|
||||||
|
let g:syntastic_erlc_attrs=""
|
||||||
|
endif
|
||||||
|
let s:check_file = expand('<sfile>:p:h') . '/erlang_check_file "'.g:syntastic_erlc_attrs.'"'
|
||||||
|
|
||||||
function! SyntaxCheckers_erlang_GetLocList()
|
function! SyntaxCheckers_erlang_GetLocList()
|
||||||
let extension = expand('%:e')
|
let extension = expand('%:e')
|
||||||
|
3
syntax_checkers/erlang_check_file
Executable file
3
syntax_checkers/erlang_check_file
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
INCLUDE_DIR=" -pa `dirname ${2}`/../include "
|
||||||
|
erl ${1} ${INCLUDE_DIR} -compile ${2}
|
@ -1,12 +0,0 @@
|
|||||||
#!/usr/bin/env escript
|
|
||||||
-export([main/1]).
|
|
||||||
|
|
||||||
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"}
|
|
||||||
]).
|
|
Loading…
Reference in New Issue
Block a user