Tighten and simplify typescript compilation-mode regexps (bug#61104)
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Tighten regexps and simplify. Translate to rx. * etc/compilation.txt: Add examples. In collaboration with Jostein Kjønigsen.
This commit is contained in:
parent
97533e73ad
commit
321cbd9a60
2 changed files with 34 additions and 8 deletions
|
@ -639,6 +639,20 @@ symbol: weblint
|
|||
index.html (13:1) Unknown element <fdjsk>
|
||||
|
||||
|
||||
* Typescript prior to tsc version 2.7, "plain" format
|
||||
|
||||
symbol: typescript-tsc-plain
|
||||
|
||||
greeter.ts(30,12): error TS2339: Property 'foo' does not exist.
|
||||
|
||||
|
||||
* Typescript after tsc version 2.7, "pretty" format
|
||||
|
||||
symbol: typescript-tsc-pretty
|
||||
|
||||
src/resources/document.ts:140:22 - error TS2362: something.
|
||||
|
||||
|
||||
* Directory tracking
|
||||
|
||||
Directories are matched via 'compilation-directory-matcher'. Files which are
|
||||
|
|
|
@ -653,19 +653,31 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?"
|
|||
;; Typescript compilation prior to tsc version 2.7, "plain" format:
|
||||
;; greeter.ts(30,12): error TS2339: Property 'foo' does not exist.
|
||||
(typescript-tsc-plain
|
||||
,(concat
|
||||
"^[[:blank:]]*"
|
||||
"\\([^(\r\n)]+\\)(\\([0-9]+\\),\\([0-9]+\\)):[[:blank:]]+"
|
||||
"error [[:alnum:]]+: [^\r\n]+$")
|
||||
,(rx bol
|
||||
(group (not (in " \t\n()")) ; 1: file
|
||||
(* (not (in "\n()"))))
|
||||
"("
|
||||
(group (+ (in "0-9"))) ; 2: line
|
||||
","
|
||||
(group (+ (in "0-9"))) ; 3: column
|
||||
"): error "
|
||||
(+ (in "0-9A-Z")) ; error code
|
||||
": ")
|
||||
1 2 3 2)
|
||||
|
||||
;; Typescript compilation after tsc version 2.7, "pretty" format:
|
||||
;; src/resources/document.ts:140:22 - error TS2362: something.
|
||||
(typescript-tsc-pretty
|
||||
,(concat
|
||||
"^[[:blank:]]*"
|
||||
"\\([^(\r\n)]+\\):\\([0-9]+\\):\\([0-9]+\\) - [[:blank:]]*"
|
||||
"error [[:alnum:]]+: [^\r\n]+$")
|
||||
,(rx bol
|
||||
(group (not (in " \t\n()")) ; 1: file
|
||||
(* (not (in "\n()"))))
|
||||
":"
|
||||
(group (+ (in "0-9"))) ; 2: line
|
||||
":"
|
||||
(group (+ (in "0-9"))) ; 3: column
|
||||
" - error "
|
||||
(+ (in "0-9A-Z")) ; error code
|
||||
": ")
|
||||
1 2 3 2)
|
||||
))
|
||||
"Alist of values for `compilation-error-regexp-alist'.")
|
||||
|
|
Loading…
Add table
Reference in a new issue