[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/flycheck 5840540ea8 01/11: Add markdownlint-cli2 checker
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/flycheck 5840540ea8 01/11: Add markdownlint-cli2 checker |
Date: |
Wed, 23 Apr 2025 10:01:06 -0400 (EDT) |
branch: elpa/flycheck
commit 5840540ea8d7dd051ca65921b859cdb6c4404f2f
Author: Bozhidar Batsov <bozhidar@batsov.dev>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>
Add markdownlint-cli2 checker
---
CHANGES.rst | 1 +
doc/languages.rst | 8 ++++++++
flycheck.el | 29 +++++++++++++++++++++++++++++
3 files changed, 38 insertions(+)
diff --git a/CHANGES.rst b/CHANGES.rst
index 324a8269ec..f64acefd32 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -18,6 +18,7 @@ New Features
customize how error messages are to be cleared.
- [#2075]: Add the ``flycheck-chktex-extra-flags`` option to the
``tex-chktex`` checker.
- [#2107]: Add ``-Xcompiler`` option for ``cuda-nvcc``.
+- Add support for ``markdownlint-cli2`` checker.
-----------
Bugs fixed
diff --git a/doc/languages.rst b/doc/languages.rst
index dd7bec1b8f..46c9031342 100644
--- a/doc/languages.rst
+++ b/doc/languages.rst
@@ -853,6 +853,14 @@ to view the docstring of the syntax checker. Likewise,
you may use
A list of enabled rules.
+ .. syntax-checker:: markdown-markdownlint-cli2
+
+ Check Markdown with markdownlint-cli2_.
+
+ .. _markdownlint-cli2: https://github.com/DavidAnson/markdownlint-cli2
+
+ .. syntax-checker-config-file::
flycheck-markdown-markdownlint-cli2-config
+
.. syntax-checker:: markdown-mdl
Check Markdown with markdownlint_ (a.k.a. ``mdl``).
diff --git a/flycheck.el b/flycheck.el
index 98abb04f57..333d63acf7 100644
--- a/flycheck.el
+++ b/flycheck.el
@@ -11300,6 +11300,35 @@ See URL
`https://github.com/igorshubovych/markdownlint-cli'."
(url
"https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#%s"))
(and error-code `(url . ,(format url error-code))))))
+(flycheck-def-config-file-var flycheck-markdown-markdownlint-cli2-config
+ markdown-markdownlint-cli2
+ '(".markdownlint-cli2.json" ".markdownlint-cli2.jsonc"
".markdownlint-cli2.yaml")
+ :package-version '(flycheck . "35"))
+
+(flycheck-define-checker markdown-markdownlint-cli2
+ "Markdown checker using markdownlint-cli2.
+
+See URL `https://github.com/DavidAnson/markdownlint-cli2'."
+ :command ("markdownlint-cli2"
+ (config-file "--config" flycheck-markdown-markdownlint-cli2-config)
+ "--"
+ source)
+ :error-patterns
+ ((error line-start
+ (file-name) ":" line
+ (? ":" column) " " (id (one-or-more (not (any space))))
+ " " (message) line-end))
+ :error-filter
+ (lambda (errors)
+ (flycheck-sanitize-errors
+ (flycheck-remove-error-file-names "(string)" errors)))
+ :modes (markdown-mode gfm-mode)
+ :error-explainer
+ (lambda (err)
+ (let ((error-code (substring (flycheck-error-id err) 0 5))
+ (url
"https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#%s"))
+ (and error-code `(url . ,(format url error-code))))))
+
(flycheck-def-option-var flycheck-markdown-mdl-rules nil markdown-mdl
"Rules to enable for mdl.
- [nongnu] elpa/flycheck updated (6968280d16 -> 80dfbdd9db), ELPA Syncer, 2025/04/23
- [nongnu] elpa/flycheck 53eae76917 02/11: Fix heading style, ELPA Syncer, 2025/04/23
- [nongnu] elpa/flycheck cd6ff72ba0 03/11: Remove unused link, ELPA Syncer, 2025/04/23
- [nongnu] elpa/flycheck 5840540ea8 01/11: Add markdownlint-cli2 checker,
ELPA Syncer <=
- [nongnu] elpa/flycheck 87b9b4edd7 04/11: Add references to markdownlint-cli2 when needed, ELPA Syncer, 2025/04/23
- [nongnu] elpa/flycheck 197f353765 05/11: Add markdown-markdownlint-cli2 to flycheck-checkers, ELPA Syncer, 2025/04/23
- [nongnu] elpa/flycheck eb10d77a4e 06/11: Add a note about the various supported markdown linters, ELPA Syncer, 2025/04/23
- [nongnu] elpa/flycheck 6e43c07e83 08/11: Release Flycheck 35, ELPA Syncer, 2025/04/23
- [nongnu] elpa/flycheck b73239837a 07/11: Automate the creation of GitHub releases, ELPA Syncer, 2025/04/23
- [nongnu] elpa/flycheck 2842e237f6 10/11: [Fix #2086] Fix the name of the PyMarkdown config, ELPA Syncer, 2025/04/23
- [nongnu] elpa/flycheck 12b2a79cf9 09/11: fix: Warning missing lexical-binding cookie, ELPA Syncer, 2025/04/23
- [nongnu] elpa/flycheck 80dfbdd9db 11/11: Remove mention of obsolete checker, ELPA Syncer, 2025/04/23