mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-25 02:57:20 +08:00
Add support for bingo (#2165)
* 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
This commit is contained in:
21
test/test_bingo_find_project_root.vader
Normal file
21
test/test_bingo_find_project_root.vader
Normal file
@@ -0,0 +1,21 @@
|
||||
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(''))
|
||||
Reference in New Issue
Block a user