summaryrefslogtreecommitdiff
path: root/lisp/progmodes/compile.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2020-12-06 16:22:09 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2020-12-09 19:43:55 +0100
commitef5e0785aee978c55abaecf44ba63867ff3598c4 (patch)
tree3df417449d201cebb0e912b3c3065e27daab2d2e /lisp/progmodes/compile.el
parent3052cbb07875ca523c318048530eebf80eb2c48f (diff)
downloademacs-ef5e0785aee978c55abaecf44ba63867ff3598c4.tar.gz
Stricter gradle-kotlin message pattern
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Rule 'gradle-kotlin': don't be more forgiving than necessary; we know exactly what the output looks like (see https://github.com/JetBrains/kotlin/commit/\ ffe8ae3840d7b9bdc82170c8181031f05ced68bd) and there is no reason to risk mismatches or expensive backtracking (bug#18109). Recognise 'info' level messages. Convert to rx.
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r--lisp/progmodes/compile.el19
1 files changed, 14 insertions, 5 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 310b332fa8b..d2293151c7d 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -241,11 +241,20 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
;; GradleStyleMessagerRenderer.kt in kotlin sources, see
;; https://youtrack.jetbrains.com/issue/KT-34683).
(gradle-kotlin
- ,(concat
- "^\\(?:\\(w\\)\\|.\\): *" ;type
- "\\(\\(?:[A-Za-z]:\\)?[^:\n]+\\): *" ;file
- "(\\([0-9]+\\), *\\([0-9]+\\))") ;line, column
- 2 3 4 (1))
+ ,(rx bol
+ (| (group "w") ; 1: warning
+ (group (in "iv")) ; 2: info
+ "e") ; error
+ ": "
+ (group ; 3: file
+ (? (in "A-Za-z") ":")
+ (+ (not (in "\n:"))))
+ ": ("
+ (group (+ digit)) ; 4: line
+ ", "
+ (group (+ digit)) ; 5: column
+ "): ")
+ 3 4 5 (1 . 2))
(iar
"^\"\\(.*\\)\",\\([0-9]+\\)\\s-+\\(?:Error\\|Warnin\\(g\\)\\)\\[[0-9]+\\]:"