mirror of
https://github.com/dense-analysis/ale.git
synced 2026-08-12 19:06:53 +08:00
🐛 Fix a Ruby deprecation warning in the ERB linter (#4521)
* Fix a Ruby deprecation warning in the ERB linter Before, the ERB linter used positional arguments. Newer versions of Ruby have deprecated this method signature. We fixed the linter to use keyword arguments. * fixup! Fix a Ruby deprecation warning in the ERB linter
This commit is contained in:
@@ -11,7 +11,7 @@ function! ale_linters#eruby#erb#GetCommand(buffer) abort
|
||||
" Rails-flavored eRuby does not comply with the standard as understood by
|
||||
" ERB, so we'll have to do some substitution. This does not reduce the
|
||||
" effectiveness of the linter—the translated code is still evaluated.
|
||||
return 'ruby -r erb -e ' . ale#Escape('puts ERB.new($stdin.read.gsub(%{<%=},%{<%}), nil, %{-}).src') . '< %t | ruby -c'
|
||||
return 'ruby -r erb -e ' . ale#Escape('puts ERB.new($stdin.read.gsub(%{<%=},%{<%}), trim_mode: %{-}).src') . '< %t | ruby -c'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('eruby', {
|
||||
|
||||
Reference in New Issue
Block a user