Allow function aliases to be registered for fixing problems, and add some more argument checking for fixing problems
This commit is contained in:
@@ -37,6 +37,7 @@ After:
|
||||
delfunction DoNothing
|
||||
delfunction CatLine
|
||||
delfunction ReplaceWithTempFile
|
||||
call ale#fix#registry#ResetToDefaults()
|
||||
|
||||
Given testft (A file with three lines):
|
||||
a
|
||||
@@ -126,3 +127,18 @@ Expect(The first function should be used):
|
||||
^a
|
||||
^b
|
||||
^c
|
||||
|
||||
Execute(ALEFix should complain for missing functions):
|
||||
let g:ale_fixers.testft = ['XXX', 'YYY']
|
||||
AssertThrows ALEFix
|
||||
AssertEqual 'Vim(echoerr):Invalid fixers used: [''XXX'', ''YYY'']', g:vader_exception
|
||||
|
||||
Execute(ALEFix should use functions from the registry):
|
||||
call ale#fix#registry#Add('add_carets', 'AddCarets', [], 'Add some carets')
|
||||
let g:ale_fixers.testft = ['add_carets']
|
||||
ALEFix
|
||||
|
||||
Expect(The registry function should be used):
|
||||
^a
|
||||
^b
|
||||
^c
|
||||
|
||||
Reference in New Issue
Block a user