mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-27 13:22:17 +08:00
Move all functions for fixing things to autoload/ale/fixers, and only accept the lines of input where needed.
This commit is contained in:
@@ -39,7 +39,7 @@ Given python(Some Python without blank lines):
|
||||
pass
|
||||
|
||||
Execute(Blank lines should be added appropriately):
|
||||
let g:ale_fixers = {'python': ['ale#handlers#python#AddLinesBeforeControlStatements']}
|
||||
let g:ale_fixers = {'python': ['add_blank_lines_for_python_control_statements']}
|
||||
ALEFix
|
||||
|
||||
Expect python(Newlines should be added):
|
||||
|
||||
@@ -39,3 +39,7 @@ Execute(We should be able to compute the argument count for lambdas):
|
||||
AssertEqual 3, ale#util#FunctionArgCount({x,y,z->1})
|
||||
AssertEqual 3, ale#util#FunctionArgCount({x,y,z,...->1})
|
||||
endif
|
||||
|
||||
Execute(We should be able to compute the argument count autoload functions not yet loaded):
|
||||
AssertEqual 1, ale#util#FunctionArgCount(function('ale#fixers#yapf#Fix'))
|
||||
AssertEqual 1, ale#util#FunctionArgCount('ale#fixers#yapf#Fix')
|
||||
|
||||
Reference in New Issue
Block a user