mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-10 06:21:53 +08:00
Fix #1611 - Fix perlcritic escaping on Windows
This commit is contained in:
@@ -30,14 +30,18 @@ Execute(The command should be correct with g:ale_perl_perlcritic_showrules off):
|
||||
let b:ale_perl_perlcritic_showrules = 0
|
||||
|
||||
AssertEqual
|
||||
\ ale#Escape('perlcritic') . ' --verbose ''%l:%c %m\n'' --nocolor',
|
||||
\ ale#Escape('perlcritic')
|
||||
\ . ' --verbose ' . ale#Escape('%l:%c %m\n')
|
||||
\ . ' --nocolor',
|
||||
\ ale_linters#perl#perlcritic#GetCommand(bufnr(''))
|
||||
|
||||
Execute(The command should be correct with g:ale_perl_perlcritic_showrules on):
|
||||
let b:ale_perl_perlcritic_showrules = 1
|
||||
|
||||
AssertEqual
|
||||
\ ale#Escape('perlcritic') . ' --verbose ''%l:%c %m [%p]\n'' --nocolor',
|
||||
\ ale#Escape('perlcritic')
|
||||
\ . ' --verbose ' . ale#Escape('%l:%c %m [%p]\n')
|
||||
\ . ' --nocolor',
|
||||
\ ale_linters#perl#perlcritic#GetCommand(bufnr(''))
|
||||
|
||||
Execute(The command search for the profile file when set):
|
||||
@@ -46,7 +50,9 @@ Execute(The command search for the profile file when set):
|
||||
let b:readme_path = ale#path#Simplify(expand('%:p:h:h:h') . '/README.md')
|
||||
|
||||
AssertEqual
|
||||
\ ale#Escape('perlcritic') . ' --verbose ''%l:%c %m\n'' --nocolor'
|
||||
\ ale#Escape('perlcritic')
|
||||
\ . ' --verbose ' . ale#Escape('%l:%c %m\n')
|
||||
\ . ' --nocolor'
|
||||
\ . ' --profile ' . ale#Escape(b:readme_path),
|
||||
\ ale_linters#perl#perlcritic#GetCommand(bufnr(''))
|
||||
|
||||
@@ -54,6 +60,8 @@ Execute(Extra options should be set appropriately):
|
||||
let b:ale_perl_perlcritic_options = 'beep boop'
|
||||
|
||||
AssertEqual
|
||||
\ ale#Escape('perlcritic') . ' --verbose ''%l:%c %m\n'' --nocolor'
|
||||
\ ale#Escape('perlcritic')
|
||||
\ . ' --verbose ' . ale#Escape('%l:%c %m\n')
|
||||
\ . ' --nocolor'
|
||||
\ . ' beep boop',
|
||||
\ ale_linters#perl#perlcritic#GetCommand(bufnr(''))
|
||||
|
||||
Reference in New Issue
Block a user