Merge pull request #1221 from JelteF/patch-1
Fix erb linter for puppet style erb templates
This commit is contained in:
commit
a7d51afda5
@ -5,7 +5,7 @@ function! ale_linters#eruby#erb#GetCommand(buffer) abort
|
|||||||
let l:rails_root = ale#ruby#FindRailsRoot(a:buffer)
|
let l:rails_root = ale#ruby#FindRailsRoot(a:buffer)
|
||||||
|
|
||||||
if empty(l:rails_root)
|
if empty(l:rails_root)
|
||||||
return 'erb -P -x %t | ruby -c'
|
return 'erb -P -T - -x %t | ruby -c'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Rails-flavored eRuby does not comply with the standard as understood by
|
" Rails-flavored eRuby does not comply with the standard as understood by
|
||||||
|
@ -10,7 +10,7 @@ Execute(Executable should not contain any filter code by default):
|
|||||||
call ale#test#SetFilename('../ruby_fixtures/not_a_rails_app/file.rb')
|
call ale#test#SetFilename('../ruby_fixtures/not_a_rails_app/file.rb')
|
||||||
|
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ 'erb -P -x %t | ruby -c',
|
\ 'erb -P -T - -x %t | ruby -c',
|
||||||
\ ale_linters#eruby#erb#GetCommand(bufnr(''))
|
\ ale_linters#eruby#erb#GetCommand(bufnr(''))
|
||||||
|
|
||||||
Execute(Executable should filter invalid eRuby when inside a Rails project):
|
Execute(Executable should filter invalid eRuby when inside a Rails project):
|
||||||
|
Loading…
Reference in New Issue
Block a user