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

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

[nongnu] elpa/typescript-mode 0fc7297870 184/222: Add compilation-mode s


From: ELPA Syncer
Subject: [nongnu] elpa/typescript-mode 0fc7297870 184/222: Add compilation-mode support for ng lint too.
Date: Sun, 6 Feb 2022 16:59:31 -0500 (EST)

branch: elpa/typescript-mode
commit 0fc729787007b5111f3584034af0f3ef2389098f
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>

    Add compilation-mode support for ng lint too.
---
 typescript-mode.el | 46 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 45 insertions(+), 1 deletion(-)

diff --git a/typescript-mode.el b/typescript-mode.el
index fa9ed24189..09add95553 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -2840,6 +2840,42 @@ the broken-down class name of the item to insert."
    ".*$")
   "Regexp to match reports generated by tslint.")
 
+(defconst typescript-nglint-error-regexp
+  (concat
+   ;; severity ("type" in Emacs' parlance)
+   "ERROR:[[:blank:]]+"
+
+   ;; filename
+   "\\([^(\r\n)]+\\)"
+   ":"
+   ;; line
+   "\\([[:digit:]]+\\)"
+   ":"
+   ;; column
+   "\\([[:digit:]]+\\)"
+
+   " - "
+   ;; message
+   ".*$"))
+
+(defconst typescript-nglint-warning-regexp
+  (concat
+   ;; severity ("type" in Emacs' parlance)
+   "WARNING:[[:blank:]]+"
+
+   ;; filename
+   "\\([^(\r\n)]+\\)"
+   ":"
+   ;; line
+   "\\([[:digit:]]+\\)"
+   ":"
+   ;; column
+   "\\([[:digit:]]+\\)"
+
+   " - "
+   ;; message
+   ".*$"))
+
 (dolist
     (regexp
      `((typescript-tsc
@@ -2852,7 +2888,15 @@ the broken-down class name of the item to insert."
 
        (typescript-tslint
         ,typescript-tslint-report-regexp
-        3 4 5 (1))))
+        3 4 5 (1))
+
+       (typescript-nglint-error
+        ,typescript-nglint-error-regexp
+        1 2 3 2)
+
+       (typescript-nglint-warning
+        ,typescript-nglint-warning-regexp
+        1 2 3 1)))
   (add-to-list 'compilation-error-regexp-alist-alist regexp)
   (add-to-list 'compilation-error-regexp-alist (car regexp)))
 



reply via email to

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