mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Support for Zlint as Zig linter (#4923)
* feat: Add Zig zlint linter and handler for ALE * docs: Add zlint documentation to ALE Zig integration guide * docs: Updating docs for zlint support * tests: Adding tests for checking zlint executable and command * refactor: Move zlint configuration test to separate test file
This commit is contained in:
committed by
GitHub
parent
c4cedeea3f
commit
59c996c5b8
19
test/linter/test_zig_zlint.vader
Normal file
19
test/linter/test_zig_zlint.vader
Normal file
@@ -0,0 +1,19 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('zig', 'zlint')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The zlint executable and command should be configured correctly):
|
||||
" 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
|
||||
Reference in New Issue
Block a user