branch: elpa/flycheck
commit b714e2770f6a2d1f441557f7c14182ae4e3defef
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Fix markdownlint error patterns for newer tool versions
    
    markdownlint-cli v0.42+ and markdownlint-cli2 v0.14+ include a
    severity word (error/warning) between the location and rule ID.
    The old pattern captured the severity word as the error ID. Add a
    more specific pattern that handles the new format, keeping the old
    pattern as fallback for older versions.
---
 flycheck.el | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/flycheck.el b/flycheck.el
index b4ce51b213..5b0f955fa5 100644
--- a/flycheck.el
+++ b/flycheck.el
@@ -11172,7 +11172,15 @@ See URL 
`https://github.com/igorshubovych/markdownlint-cli'."
             "--"
             source)
   :error-patterns
-  ((error line-start
+  (;; markdownlint-cli v0.42+/cli2 v0.14+ include a severity word
+   (error line-start
+          (file-name) ":" line
+          (? ":" column) " "
+          (or "error" "warning") " "
+          (id (one-or-more (not (any space))))
+          " " (message) line-end)
+   ;; older versions without severity word
+   (error line-start
           (file-name) ":" line
           (? ":" column) " " (id (one-or-more (not (any space))))
           " " (message) line-end))
@@ -11195,7 +11203,15 @@ See URL 
`https://github.com/DavidAnson/markdownlint-cli2'."
             "--"
             source)
   :error-patterns
-  ((error line-start
+  (;; markdownlint-cli v0.42+/cli2 v0.14+ include a severity word
+   (error line-start
+          (file-name) ":" line
+          (? ":" column) " "
+          (or "error" "warning") " "
+          (id (one-or-more (not (any space))))
+          " " (message) line-end)
+   ;; older versions without severity word
+   (error line-start
           (file-name) ":" line
           (? ":" column) " " (id (one-or-more (not (any space))))
           " " (message) line-end))

Reply via email to