branch: elpa/flycheck
commit 1fab0226884a4615e9af69629a8e4de405a0b661
Author: Tony Zorman <soliditsallg...@mailbox.org>
Commit: Bozhidar Batsov <bozhi...@batsov.dev>

    Add flycheck-chktex-extra-flags
    
    This works like tex-chktex-extra-flags in that the user may specify
    arbitrary flags to be passed to chktex.
---
 CHANGES.rst |  1 +
 flycheck.el | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/CHANGES.rst b/CHANGES.rst
index b95e241d03..5e1d019a70 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -16,6 +16,7 @@ New Features
 - [#2071]: Add a new checker ``perl-perlimports``, for cleaning up Perl import 
statements.
 - [#1972]: New defcustom ``flycheck-clear-displayed-errors-function`` to
   customize how error messages are to be cleared.
+- [#2075]: Add the ``flycheck-chktex-extra-flags`` option to the 
``tex-chktex`` checker.
 
 -----------
 Bugs fixed
diff --git a/flycheck.el b/flycheck.el
index 7cf79ae8be..d8cf0b2269 100644
--- a/flycheck.el
+++ b/flycheck.el
@@ -12602,12 +12602,25 @@ See URL 
`https://github.com/terraform-linters/tflint'."
   :predicate flycheck-buffer-saved-p
   :modes terraform-mode)
 
+(flycheck-def-option-var flycheck-chktex-extra-flags nil tex-chktex
+  "A list of extra arguments to give to chktex.
+This variable works the same way as `tex-chktex-extra-flags': its value
+is a list of strings, where each string is an argument added to chktex.
+
+For example, to ignore warnings 8 and 18, you would set this option to
+
+  '(\"-n8\" \"-n18\")."
+  :type '(repeat string)
+  :safe #'flycheck-string-list-p
+  :package-version '(flycheck . "35"))
+
 (flycheck-define-checker tex-chktex
   "A TeX and LaTeX syntax and style checker using chktex.
 
 See URL `https://www.nongnu.org/chktex/'."
   :command ("chktex"
             (config-file "--localrc" flycheck-chktexrc)
+            (option-list "" flycheck-chktex-extra-flags concat)
             ;; Compact error messages, and no version information, and execute
             ;; \input statements
             "--verbosity=0" "--quiet" "--inputfiles")

Reply via email to