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:
Enrique Miguel Mora Meza
2025-03-18 16:30:05 +04:00
committed by GitHub
parent c4cedeea3f
commit 59c996c5b8
7 changed files with 114 additions and 1 deletions

View 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