[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/typescript-mode 447cfbc078 030/222: Improve compilation-mo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/typescript-mode 447cfbc078 030/222: Improve compilation-mode support. |
Date: |
Sun, 6 Feb 2022 16:59:03 -0500 (EST) |
branch: elpa/typescript-mode
commit 447cfbc078c5752ef6874c4779121bca81c44890
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Improve compilation-mode support.
Now also support output from tslint.
---
typescript-mode.el | 41 +++++++++++++++++++++++++++++++++--------
1 file changed, 33 insertions(+), 8 deletions(-)
diff --git a/typescript-mode.el b/typescript-mode.el
index 52ec3dc2ca..ce3ba209ca 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -1987,14 +1987,39 @@ the broken-down class name of the item to insert."
;; handle compiler-errors like the following when doing M-x
compile<ret>tsc<ret>
;; greeter.ts(24,9): error TS2362: The left-hand side of an arithmetic
operation must be of type 'any', 'number' or an enum type.
;; greeter.ts(30,12): error TS2339: Property 'indexOf' does not exist on type
'number'.
-(add-to-list 'compilation-error-regexp-alist 'typescript-mode)
-(add-to-list 'compilation-error-regexp-alist-alist
- (list 'typescript-mode
- (concat
- "^[[:blank:]]*"
- "\\([^(\r\n)]+\\)(\\([0-9]+\\),\\([0-9]+\\)):[[:blank:]]+"
- "error [[:alnum:]]+: [^\r\n]+$")
- 1 2 3 1))
+(defconst typescript-tsc-error-regexp
+ (concat
+ "^[[:blank:]]*"
+ "\\([^(\r\n)]+\\)(\\([0-9]+\\),\\([0-9]+\\)):[[:blank:]]+"
+ "error [[:alnum:]]+: [^\r\n]+$")
+ "Regexp to match errors generated by tsc.")
+
+;; Should handle output like:
+;; src/modules/authenticator.ts[1, 83]: ' should be "
+;; src/modules/authenticator.ts[2, 26]: ' should be "
+(defconst typescript-tslint-warning-regexp
+ (concat
+ "^[[:blank:]]*"
+ "\\([^(\r\n)]+\\)" ;; filename
+ "\\["
+ "\\([[:digit:]]+\\)" ; line
+ ", "
+ "\\([[:digit:]]+\\)" ; column
+ "\\]: "
+ "\\(.*\\)$" ;; type of warnings
+ )
+ "Regexp to match warnings generated by tslint.")
+
+(dolist
+ (regexp
+ `((typescript-tsc
+ ,typescript-tsc-error-regexp
+ 1 2 3 2))
+ `((typescript-tslint
+ ,typescript-tslint-warning-regexp
+ 1 2 3 1)))
+ (add-to-list 'compilation-error-regexp-alist-alist regexp)
+ (add-to-list 'compilation-error-regexp-alist (car regexp)))
;;; Main Function
- [nongnu] elpa/typescript-mode 49ff1149e2 218/222: Add `override` to the list of highlighted keywords, (continued)
- [nongnu] elpa/typescript-mode 49ff1149e2 218/222: Add `override` to the list of highlighted keywords, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 36f685251f 008/222: Merge pull request #2 from quanticle/master, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 5a3c84247d 007/222: Typescript added the "protected" keyword in 1.3., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 49241bcc1f 011/222: Merge pull request #3 from OrangeShark/typescript1.5, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode ad8f356cbe 021/222: Merge pull request #15 from valerian/bool, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 39827549ef 017/222: Merge pull request #13 from wingyplus/highlight-set-and-get-keyword, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 266be8f6c7 018/222: added "readonly" keyword, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 588d5f3d63 027/222: Update README.md, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode f72826e564 036/222: Merge pull request #25 from ananthakumaran/revert-24-wrong-cursor-position, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode d5c4fb27c8 034/222: Merge pull request #24 from hekt/wrong-cursor-position, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 447cfbc078 030/222: Improve compilation-mode support.,
ELPA Syncer <=
- [nongnu] elpa/typescript-mode b502d8453d 041/222: On second thought, lets NOT support Emacs 24.1 and 24.2., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode f25f4751fe 052/222: Merge pull request #31 from lddubeau/fix/spread-syntax, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 2587e92851 047/222: Don't interpret class members as keywords., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode face381789 083/222: Implement clean make-target to assist local development., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 20af0fec5f 077/222: Extend function prefix font-lock test to check arguments are correct., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 5e2165d4b6 038/222: We need a Gitignore-file., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 330c887241 095/222: Fix indentation of functions with numbers in return type., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode b7074c5dea 106/222: Remove redundant code, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode bf9a4155cc 043/222: Revise Emacs versions tested a little more., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode a3c91282bc 039/222: Add test-case and indentation-reference document., ELPA Syncer, 2022/02/06