5bbe77101d
* Add support for https://github.com/saibing/bingo * Add docs for ale-go-bingo * Use go.mod when found * Add test for bingo FindProjectRoot * Simplify ale_linters#go#bingo#GetCommand
21 lines
646 B
Text
21 lines
646 B
Text
Before:
|
|
call ale#test#SetDirectory('/testplugin/test')
|
|
runtime ale_linters/go/bingo.vim
|
|
|
|
After:
|
|
call ale#test#RestoreDirectory()
|
|
call ale#linter#Reset()
|
|
|
|
Execute(Should return directory for 'go.mod' if found in parent directory):
|
|
call ale#test#SetFilename('go_files/test.go')
|
|
|
|
AssertEqual
|
|
\ ale#path#Simplify(g:dir . '/go_files'),
|
|
\ ale_linters#go#bingo#FindProjectRoot(bufnr(''))
|
|
|
|
Execute(Should return nearest directory with '.git' if found in parent directory):
|
|
call ale#test#SetFilename('test.go')
|
|
|
|
AssertEqual
|
|
\ fnamemodify(ale#path#Simplify('/testplugin'), ':p:h'),
|
|
\ ale_linters#go#bingo#FindProjectRoot(bufnr(''))
|