Merge pull request #1221 from JelteF/patch-1

Fix erb linter for puppet style erb templates
This commit is contained in:
w0rp 2017-12-19 14:09:00 +00:00 committed by GitHub
commit a7d51afda5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ function! ale_linters#eruby#erb#GetCommand(buffer) abort
let l:rails_root = ale#ruby#FindRailsRoot(a:buffer)
if empty(l:rails_root)
return 'erb -P -x %t | ruby -c'
return 'erb -P -T - -x %t | ruby -c'
endif
" Rails-flavored eRuby does not comply with the standard as understood by

View File

@ -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')
AssertEqual
\ 'erb -P -x %t | ruby -c',
\ 'erb -P -T - -x %t | ruby -c',
\ ale_linters#eruby#erb#GetCommand(bufnr(''))
Execute(Executable should filter invalid eRuby when inside a Rails project):