mirror of
https://github.com/dense-analysis/ale.git
synced 2026-10-03 00:43:44 +08:00
Go: Add gotype support (#1099)
This commit is contained in:
1 parent
c9d66b861b
commit
b6d1c41925
6 files changed
+51
-2
No files matched your search
@@ -0,0 +1,19 @@
|
||||
Before:
|
||||
runtime ale_linters/go/gotype.vim
|
||||
call ale#test#SetFilename('../go_files/testfile2.go')
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
||||
|
||||
|
||||
Execute(The gotype callback should include other files from the directory but exclude the file itself):
|
||||
let dir = expand('#' . bufnr('') . ':p:h')
|
||||
AssertEqual
|
||||
\ "gotype %t ". ale#Escape(ale#path#Simplify(dir . "/testfile.go")),
|
||||
\ ale_linters#go#gotype#GetCommand(bufnr(''))
|
||||
|
||||
Execute(The gotype callback should ignore test files):
|
||||
call ale#test#SetFilename('bla_test.go')
|
||||
AssertEqual
|
||||
\ 0,
|
||||
\ ale_linters#go#gotype#GetCommand(bufnr(''))
|
||||
Reference in new issue
Block a user