mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Merge pull request #3381 from andreypopp/gofmt-stding-stdout
Use stdin/stdout to communicate with gofmt
This commit is contained in:
@@ -21,10 +21,7 @@ Execute(The gofmt callback should return the correct default values):
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'read_temporary_file': 1,
|
||||
\ 'command': ale#Escape('xxxinvalid')
|
||||
\ . ' -l -w'
|
||||
\ . ' %t',
|
||||
\ 'command': ale#Escape('xxxinvalid'),
|
||||
\ },
|
||||
\ ale#fixers#gofmt#Fix(bufnr(''))
|
||||
|
||||
@@ -35,11 +32,8 @@ Execute(The gofmt callback should include custom gofmt options):
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'read_temporary_file': 1,
|
||||
\ 'command': ale#Escape('xxxinvalid')
|
||||
\ . ' -l -w'
|
||||
\ . ' ' . g:ale_go_gofmt_options
|
||||
\ . ' %t',
|
||||
\ . ' ' . g:ale_go_gofmt_options,
|
||||
\ },
|
||||
\ ale#fixers#gofmt#Fix(bufnr(''))
|
||||
|
||||
@@ -50,9 +44,7 @@ Execute(The gofmt callback should support Go environment variables):
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'read_temporary_file': 1,
|
||||
\ 'command': ale#Env('GO111MODULE', 'off')
|
||||
\ . ale#Escape('xxxinvalid') . ' -l -w'
|
||||
\ . ' %t',
|
||||
\ . ale#Escape('xxxinvalid')
|
||||
\ },
|
||||
\ ale#fixers#gofmt#Fix(bufnr(''))
|
||||
|
||||
Reference in New Issue
Block a user