Support fixer aliases, and make prettier-eslint and prettier-standard just work

This commit is contained in:
w0rp
2017-11-22 15:31:39 +00:00
parent 5ed6f66f77
commit 5d2ab192cf
5 changed files with 71 additions and 8 deletions

View File

@@ -0,0 +1,5 @@
Execute(prettier-eslint should be aliased):
AssertEqual 'ale#fixers#prettier_eslint#Fix', ale#fix#registry#GetFunc('prettier-eslint')
Execute(prettier-standard should be aliased):
AssertEqual 'ale#fixers#prettier_standard#Fix', ale#fix#registry#GetFunc('prettier-standard')

View File

@@ -80,7 +80,7 @@ Execute(ALEFixSuggest output should be correct for only filetype handlers):
Execute(ALEFixSuggest should suggest filetype and generic handlers):
let &filetype = 'testft2.testft'
call ale#fix#registry#Add('zed', 'XYZ', ['testft2'], 'Zedify things.')
call ale#fix#registry#Add('zed', 'XYZ', ['testft2'], 'Zedify things.', ['foobar'])
call ale#fix#registry#Add('alpha', 'XYZ', ['testft'], 'Alpha things.')
call ale#fix#registry#Add('generic', 'XYZ', [], 'Generic things.')
@@ -89,7 +89,7 @@ Execute(ALEFixSuggest should suggest filetype and generic handlers):
\ 'Try the following fixers appropriate for the filetype:',
\ '',
\ '''alpha'' - Alpha things.',
\ '''zed'' - Zedify things.',
\ '''zed'', ''foobar'' - Zedify things.',
\ '',
\ 'Try the following generic fixers:',
\ '',