Merge pull request #1198 from Carpetsmoker/goimports
goimports fixer doesn't work for vendored libraries
This commit is contained in:
		
						commit
						fcfd1025cc
					
				@ -14,7 +14,7 @@ function! ale#fixers#goimports#Fix(buffer) abort
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
    \   'command': ale#Escape(l:executable)
 | 
					    \   'command': ale#Escape(l:executable)
 | 
				
			||||||
    \       . ' -l -w'
 | 
					    \       . ' -l -w -srcdir %s'
 | 
				
			||||||
    \       . (empty(l:options) ? '' : ' ' . l:options)
 | 
					    \       . (empty(l:options) ? '' : ' ' . l:options)
 | 
				
			||||||
    \       . ' %t',
 | 
					    \       . ' %t',
 | 
				
			||||||
    \   'read_temporary_file': 1,
 | 
					    \   'read_temporary_file': 1,
 | 
				
			||||||
 | 
				
			|||||||
@ -25,7 +25,7 @@ Execute(The goimports callback should the command when the executable test passe
 | 
				
			|||||||
  AssertEqual
 | 
					  AssertEqual
 | 
				
			||||||
  \ {
 | 
					  \ {
 | 
				
			||||||
  \   'read_temporary_file': 1,
 | 
					  \   '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(''))
 | 
					  \ ale#fixers#goimports#Fix(bufnr(''))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -36,6 +36,6 @@ Execute(The goimports callback should include extra options):
 | 
				
			|||||||
  AssertEqual
 | 
					  AssertEqual
 | 
				
			||||||
  \ {
 | 
					  \ {
 | 
				
			||||||
  \   'read_temporary_file': 1,
 | 
					  \   '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(''))
 | 
					  \ ale#fixers#goimports#Fix(bufnr(''))
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user