mirror of
https://github.com/dense-analysis/ale.git
synced 2026-07-29 19:26:46 +08:00
chktex: always use the right format and grab the error code (#5146)
Using -v0 works out of the box, but chktex grabs the "v0 format" from
its configuration file:
OutFormat
{
# -v0; silent mode
%f%b%l%b%c%b%n%b%m!n
# -v1; normal mode
...
}
Should the user modify the definition of v0, then the linter would no
longer work. We therefore use "--format" to force the output format.
Also grab the error code so it is correctly displayed.
Closes: #3856
This commit is contained in:
@@ -10,7 +10,7 @@ Execute(The default command should be correct):
|
||||
AssertLinter 'chktex', [
|
||||
\ ale#Escape('chktex') . ' --version',
|
||||
\ ale#Escape('chktex')
|
||||
\ . ' -v0 -p stdin -q'
|
||||
\ . " --format $'%f%b%l%b%c%b%n%b%m\n' -p stdin -q"
|
||||
\ . ' -I',
|
||||
\]
|
||||
|
||||
@@ -18,7 +18,7 @@ Execute(The default command should be correct):
|
||||
GivenCommandOutput []
|
||||
AssertLinter 'chktex', [
|
||||
\ ale#Escape('chktex')
|
||||
\ . ' -v0 -p stdin -q'
|
||||
\ . " --format $'%f%b%l%b%c%b%n%b%m\n' -p stdin -q"
|
||||
\ . ' -I',
|
||||
\]
|
||||
|
||||
@@ -28,7 +28,7 @@ Execute(The default command should be correct):
|
||||
AssertLinter 'chktex', [
|
||||
\ ale#Escape('chktex') . ' --version',
|
||||
\ ale#Escape('chktex')
|
||||
\ . ' -v0 -p stdin -q'
|
||||
\ . " --format $'%f%b%l%b%c%b%n%b%m\n' -p stdin -q"
|
||||
\ . ' -S TabSize=1'
|
||||
\ . ' -I',
|
||||
\]
|
||||
@@ -38,7 +38,7 @@ Execute(The executable should be configurable):
|
||||
|
||||
AssertLinter 'bin/foo',
|
||||
\ ale#Escape('bin/foo')
|
||||
\ . ' -v0 -p stdin -q'
|
||||
\ . " --format $'%f%b%l%b%c%b%n%b%m\n' -p stdin -q"
|
||||
\ . ' -I'
|
||||
|
||||
Execute(The options should be configurable):
|
||||
@@ -46,5 +46,5 @@ Execute(The options should be configurable):
|
||||
|
||||
AssertLinter 'chktex',
|
||||
\ ale#Escape('chktex')
|
||||
\ . ' -v0 -p stdin -q'
|
||||
\ . " --format $'%f%b%l%b%c%b%n%b%m\n' -p stdin -q"
|
||||
\ . ' --something'
|
||||
|
||||
Reference in New Issue
Block a user