mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Simplfiy zlint configuration and tests
This commit is contained in:
@@ -5,15 +5,11 @@ After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The zlint executable and command should be configured correctly):
|
||||
AssertLinter 'zlint', ale#Escape('zlint') . ' %s -f gh'
|
||||
|
||||
" Set a custom executable path
|
||||
let g:ale_zig_zlint_executable = '/custom/path/to/zlint'
|
||||
|
||||
" Create a buffer with Zig filetype
|
||||
call ale#test#SetFilename('test.zig')
|
||||
|
||||
" Check the executable
|
||||
AssertEqual '/custom/path/to/zlint', ale#Var(bufnr(''), 'zig_zlint_executable')
|
||||
|
||||
" Check the command
|
||||
let cmd = ale_linters#zig#zlint#GetCommand(bufnr(''))
|
||||
AssertEqual ale#Escape('/custom/path/to/zlint') . ' %s -f gh', cmd
|
||||
AssertLinter
|
||||
\ '/custom/path/to/zlint',
|
||||
\ ale#Escape('/custom/path/to/zlint') . ' %s -f gh'
|
||||
|
||||
Reference in New Issue
Block a user