mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-09 04:52:29 +08:00
Fix chktex highlighting wrong column when using tabs instead of spaces (#4727)
* Fix '-s' to be '-S' when setting 'TabSize=1' for chktex Fixes #4712 Closes #4725 * Check if chktex's -S option is available * Check chktex version instead of trying -S option
This commit is contained in:
@@ -1,14 +1,37 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('tex', 'chktex')
|
||||
|
||||
GivenCommandOutput ['ChkTeX v1.7.6 - Copyright 1995-96 Jens T. Berger Thielemann']
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The default command should be correct):
|
||||
AssertLinter 'chktex',
|
||||
AssertLinter 'chktex', [
|
||||
\ ale#Escape('chktex') . ' --version',
|
||||
\ ale#Escape('chktex')
|
||||
\ . ' -v0 -p stdin -q'
|
||||
\ . ' -I'
|
||||
\ . ' -I',
|
||||
\]
|
||||
|
||||
" The version check should be cached.
|
||||
GivenCommandOutput []
|
||||
AssertLinter 'chktex', [
|
||||
\ ale#Escape('chktex')
|
||||
\ . ' -v0 -p stdin -q'
|
||||
\ . ' -I',
|
||||
\]
|
||||
|
||||
" Try newer version
|
||||
call ale#semver#ResetVersionCache()
|
||||
GivenCommandOutput ['ChkTeX v1.7.8 - Copyright 1995-96 Jens T. Berger Thielemann']
|
||||
AssertLinter 'chktex', [
|
||||
\ ale#Escape('chktex') . ' --version',
|
||||
\ ale#Escape('chktex')
|
||||
\ . ' -v0 -p stdin -q'
|
||||
\ . ' -S TabSize=1'
|
||||
\ . ' -I',
|
||||
\]
|
||||
|
||||
Execute(The executable should be configurable):
|
||||
let g:ale_tex_chktex_executable = 'bin/foo'
|
||||
|
||||
Reference in New Issue
Block a user