branch: elpa/typescript-mode
commit 0fc729787007b5111f3584034af0f3ef2389098f
Author: Jostein Kjønigsen <[email protected]>
Commit: Jostein Kjønigsen <[email protected]>
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)))