mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-06 11:33:30 +08:00
Add support for erlfmt fixer (#3602)
* Add support for `erlfmt` * Add missing entry to table of contents * Fix warnings * Add missing tools to supported tools
This commit is contained in:
25
test/fixers/test_erlfmt_fixer_callback.vader
Normal file
25
test/fixers/test_erlfmt_fixer_callback.vader
Normal file
@@ -0,0 +1,25 @@
|
||||
Before:
|
||||
Save b:ale_elm_format_executable
|
||||
Save b:ale_elm_format_options
|
||||
|
||||
let b:ale_elm_format_executable = 'erlfmt'
|
||||
let b:ale_elm_format_options = ''
|
||||
|
||||
After:
|
||||
Restore
|
||||
|
||||
Execute(The erlfmt command should handle empty options):
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('erlfmt') . ' %s'
|
||||
\ },
|
||||
\ ale#fixers#erlfmt#Fix(bufnr(''))
|
||||
|
||||
Execute(The erlfmt command should handle custom options):
|
||||
let b:ale_erlang_erlfmt_options = '--insert-pragma'
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('erlfmt') . ' --insert-pragma %s'
|
||||
\ },
|
||||
\ ale#fixers#erlfmt#Fix(bufnr(''))
|
||||
Reference in New Issue
Block a user