Commit Graph
4 Commits
Author SHA1 Message Date
Cyril RoelandtandGitHub 94a8a88f0d 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
2026-07-25 22:24:26 +09:00
JorengarenarandGitHub 9b8413a825 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
2024-02-27 08:54:14 +09:00
Horacio SansonandGitHub 00dcf52d6f 4712 revert chktex 4661 (#4725)
* Fix 4712 - revert #4661

* Fix tests
2024-02-26 11:56:56 +09:00
JorengarenarandGitHub 94f764631d Fix chktex highlighting wrong column when using tabs instead of spaces (#4661)
* Fix chktex highlighting wrong column when using tabs instead of spaces

Fixes #723

chktex implemented feature request [1] for allowing setting options from
the command line. Thanks to that we can tell it to treat tab character
as of one space width, i.e. one char. That means, after we translate the
output back to Vim columns, we get correct numbers.

[1]: https://savannah.nongnu.org/bugs/?56486

* Add test_tex_chktex.vader

* Use functions to set g: variables in ale_linters/tex/chktex.vim

* Update ale_linters#tex#chktex#GetCommand() to use '%e'
2024-01-14 21:04:23 +09:00