Make gometalinter work again
They changed their logic to use related paths instead of absoluut paths (see [here](a04df08be5 (diff-04424ed7c660c10495a54e8d11be89eaR253)
))
This fixes the linter by also using relative paths…
This commit is contained in:
parent
768f761017
commit
5c7b55edec
@ -10,11 +10,11 @@ endfunction
|
|||||||
|
|
||||||
function! ale_linters#go#gometalinter#GetCommand(buffer) abort
|
function! ale_linters#go#gometalinter#GetCommand(buffer) abort
|
||||||
let l:executable = ale_linters#go#gometalinter#GetExecutable(a:buffer)
|
let l:executable = ale_linters#go#gometalinter#GetExecutable(a:buffer)
|
||||||
let l:filename = expand('#' . a:buffer . ':p')
|
let l:filename = expand('#' . a:buffer)
|
||||||
let l:options = ale#Var(a:buffer, 'go_gometalinter_options')
|
let l:options = ale#Var(a:buffer, 'go_gometalinter_options')
|
||||||
|
|
||||||
return ale#Escape(l:executable)
|
return ale#Escape(l:executable)
|
||||||
\ . ' --include=''^' . l:filename . '.*$'''
|
\ . ' --include=' . ale#Escape(l:filename)
|
||||||
\ . (!empty(l:options) ? ' ' . l:options : '')
|
\ . (!empty(l:options) ? ' ' . l:options : '')
|
||||||
\ . ' ' . ale#Escape(fnamemodify(l:filename, ':h'))
|
\ . ' ' . ale#Escape(fnamemodify(l:filename, ':h'))
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -22,7 +22,7 @@ Execute(The gometalinter callback should return the right defaults):
|
|||||||
\ ale_linters#go#gometalinter#GetExecutable(bufnr(''))
|
\ ale_linters#go#gometalinter#GetExecutable(bufnr(''))
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ ale#Escape('gometalinter')
|
\ ale#Escape('gometalinter')
|
||||||
\ . ' --include=''^' . expand('%:p') . '.*$'''
|
\ . ' --include=' . ale#Escape(expand('%'))
|
||||||
\ . ' ' . ale#Escape(getcwd()),
|
\ . ' ' . ale#Escape(getcwd()),
|
||||||
\ ale_linters#go#gometalinter#GetCommand(bufnr(''))
|
\ ale_linters#go#gometalinter#GetCommand(bufnr(''))
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ Execute(The gometalinter callback should use a configured executable):
|
|||||||
\ ale_linters#go#gometalinter#GetExecutable(bufnr(''))
|
\ ale_linters#go#gometalinter#GetExecutable(bufnr(''))
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ ale#Escape('something else')
|
\ ale#Escape('something else')
|
||||||
\ . ' --include=''^' . expand('%:p') . '.*$'''
|
\ . ' --include=' . ale#Escape(expand('%'))
|
||||||
\ . ' ' . ale#Escape(getcwd()),
|
\ . ' ' . ale#Escape(getcwd()),
|
||||||
\ ale_linters#go#gometalinter#GetCommand(bufnr(''))
|
\ ale_linters#go#gometalinter#GetCommand(bufnr(''))
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ Execute(The gometalinter callback should use configured options):
|
|||||||
|
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ ale#Escape('gometalinter')
|
\ ale#Escape('gometalinter')
|
||||||
\ . ' --include=''^' . expand('%:p') . '.*$'''
|
\ . ' --include=' . ale#Escape(expand('%'))
|
||||||
\ . ' --foobar'
|
\ . ' --foobar'
|
||||||
\ . ' ' . ale#Escape(getcwd()),
|
\ . ' ' . ale#Escape(getcwd()),
|
||||||
\ ale_linters#go#gometalinter#GetCommand(bufnr(''))
|
\ ale_linters#go#gometalinter#GetCommand(bufnr(''))
|
||||||
|
Loading…
Reference in New Issue
Block a user