Merge pull request #1198 from Carpetsmoker/goimports

goimports fixer doesn't work for vendored libraries
This commit is contained in:
w0rp 2017-12-08 13:09:22 +00:00 committed by GitHub
commit fcfd1025cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ function! ale#fixers#goimports#Fix(buffer) abort
return {
\ 'command': ale#Escape(l:executable)
\ . ' -l -w'
\ . ' -l -w -srcdir %s'
\ . (empty(l:options) ? '' : ' ' . l:options)
\ . ' %t',
\ 'read_temporary_file': 1,

View File

@ -25,7 +25,7 @@ Execute(The goimports callback should the command when the executable test passe
AssertEqual
\ {
\ 'read_temporary_file': 1,
\ 'command': ale#Escape(g:ale_go_goimports_executable) . ' -l -w %t'
\ 'command': ale#Escape(g:ale_go_goimports_executable) . ' -l -w -srcdir %s %t'
\ },
\ ale#fixers#goimports#Fix(bufnr(''))
@ -36,6 +36,6 @@ Execute(The goimports callback should include extra options):
AssertEqual
\ {
\ 'read_temporary_file': 1,
\ 'command': ale#Escape(g:ale_go_goimports_executable) . ' -l -w --xxx %t'
\ 'command': ale#Escape(g:ale_go_goimports_executable) . ' -l -w -srcdir %s --xxx %t'
\ },
\ ale#fixers#goimports#Fix(bufnr(''))