mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-16 01:07:06 +08:00
Add fourmolu fixer (#4501)
* Add fourmolu fixer Fourmolu is aversion of Ormolu that supports configuration. This fixer was modeled after the Ormolu one, but using the "stack executable" approach of the Brittany and Stylish Haskell fixers. * Sort supported-tools.md
This commit is contained in:
29
test/fixers/test_fourmolu_fixer_callback.vader
Normal file
29
test/fixers/test_fourmolu_fixer_callback.vader
Normal file
@@ -0,0 +1,29 @@
|
||||
Before:
|
||||
Save g:ale_haskell_fourmolu_executable
|
||||
Save g:ale_haskell_fourmolu_options
|
||||
|
||||
After:
|
||||
Restore
|
||||
|
||||
Execute(The fourmolu callback should return the correct default values):
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('fourmolu')
|
||||
\ . ' --stdin-input-file '
|
||||
\ . ale#Escape(@%)
|
||||
\ },
|
||||
\ ale#fixers#fourmolu#Fix(bufnr(''))
|
||||
|
||||
Execute(The fourmolu executable and options should be configurable):
|
||||
let g:ale_haskell_fourmolu_executable = '/path/to/fourmolu'
|
||||
let g:ale_haskell_fourmolu_options = '-h'
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('/path/to/fourmolu')
|
||||
\ . ' -h'
|
||||
\ . ' --stdin-input-file '
|
||||
\ . ale#Escape(@%)
|
||||
\ },
|
||||
\ ale#fixers#fourmolu#Fix(bufnr(''))
|
||||
|
||||
Reference in New Issue
Block a user