emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/idris-mode cab781537f 05/10: Improve flycheck error patter


From: ELPA Syncer
Subject: [nongnu] elpa/idris-mode cab781537f 05/10: Improve flycheck error patterns for Idris(2)
Date: Wed, 18 Jan 2023 07:59:53 -0500 (EST)

branch: elpa/idris-mode
commit cab781537faeb73723bc66571ac9bcb2bb7f3dab
Author: Marek L <nospam.keram@gmail.com>
Commit: Marek L <nospam.keram@gmail.com>

    Improve flycheck error patterns for Idris(2)
    
    TODO: Test Idris 1 warning pattern and update if needed
---
 flycheck-idris.el | 39 ++++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/flycheck-idris.el b/flycheck-idris.el
index badd399560..d6d3637c26 100644
--- a/flycheck-idris.el
+++ b/flycheck-idris.el
@@ -40,8 +40,16 @@
           line
           ":"
           column
-          ":"
-          (message (and (* nonl) (* "\n" (not (any "/" "~")) (* nonl))))))
+          "-"
+          end-column
+          ":" line-end "\n"
+          (one-or-more blank) "|\n"
+          (one-or-more digit) (one-or-more blank) "|" (one-or-more 
not-newline) "\n"
+          (one-or-more blank) "|" (zero-or-more blank) (one-or-more "~") "\n"
+          (one-or-more not-newline) "\n"
+          (one-or-more blank) (one-or-more not-newline) "\n\n"
+          (message (one-or-more not-newline)
+                   (zero-or-more "\n" (one-or-more not-newline)))))
   :modes idris-mode)
 
 
@@ -54,31 +62,24 @@
             source-original)
   :error-patterns ((warning line-start
                             "Warning: "
-                            (message (seq (and (* nonl)
-                                               (* "\n"
-                                                  (not (any "/" "~"))
-                                                  (* nonl)))
-                                          (+ "\n")))
-                            (file-name)
+                            (message (one-or-more not-newline)
+                                     (zero-or-more "\n" (one-or-more 
not-newline))
+                                     "\n\n")
+                            (one-or-more (not ":")) ;; (file-name)
                             ":"  line
                             ":"  column
                             "--" end-line
-                            ":"  end-column
-                            )
+                            ":"  end-column)
                    (error line-start
                           "Error: "
-                          (message (seq (and (* nonl)
-                                             (* "\n"
-                                                (not (any "/" "~"))
-                                                (* nonl)))
-                                        (+ "\n")))
-                          (file-name)
+                          (message (one-or-more not-newline)
+                                   (zero-or-more "\n" (one-or-more 
not-newline))
+                                   "\n\n")
+                          (one-or-more (not ":")) ;; (file-name)
                           ":"  line
                           ":"  column
                           "--" end-line
-                          ":"  end-column
-                          )
-                   )
+                          ":"  end-column))
   :modes idris-mode)
 
 (setq flycheck-idris2-executable "idris2")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]