mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Make Compilation mode recognize non-legacy Kotlin/Gradle errors
The Compilation mode recognizes Kotlin/Gradle errors but only in the now legacy format. The current format, which has been in wide use for about a year, is not supported. This change adds support for the current format. * etc/compilation.txt: (symbols): Add examples of non-legacy Kotlin/Gradle warnings and errors. * lisp/progmodes/compile.el: (compilation-error-regexp-alist-alist): Rename 'gradle-kotlin' to 'gradle-kotlin-legacy' and add 'grade-kotlin' that matches the errors and warnings outputted by the current (non-legacy) Kotlin/Gradle. (Bug#70797) * test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data): Rename 'gradle-kotlin' to 'gradle-kotlin-legacy' and add two test cases for the newly added, non-legacy Kotlin/Gradle warnings and errors.
This commit is contained in:
parent
4f03083499
commit
e1ba4ebb49
3 changed files with 44 additions and 13 deletions
|
|
@ -263,10 +263,28 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
|
|||
"\\(^Warning .*\\)? line[ \n]\\([0-9]+\\)[ \n]\\(?:col \\([0-9]+\\)[ \n]\\)?file \\([^ :;\n]+\\)"
|
||||
4 2 3 (1))
|
||||
|
||||
;; Gradle with kotlin-gradle-plugin (see
|
||||
;; GradleStyleMessagerRenderer.kt in kotlin sources, see
|
||||
;; https://youtrack.jetbrains.com/issue/KT-34683).
|
||||
;; Introduced in Kotlin 1.8 and current as of Kotlin 2.0.
|
||||
;; Emitted by `GradleStyleMessagerRenderer' in Kotlin sources.
|
||||
(gradle-kotlin
|
||||
,(rx bol
|
||||
(| (group "w") ; 1: warning
|
||||
(group (in "iv")) ; 2: info
|
||||
"e") ; error
|
||||
": "
|
||||
"file://"
|
||||
(group ; 3: file
|
||||
(? (in "A-Za-z") ":")
|
||||
(+ (not (in "\n:"))))
|
||||
":"
|
||||
(group (+ digit)) ; 4: line
|
||||
":"
|
||||
(group (+ digit)) ; 5: column
|
||||
" ")
|
||||
3 4 5 (1 . 2))
|
||||
|
||||
;; Obsoleted in Kotlin 1.8 Beta, released on Nov 15, 2022.
|
||||
;; See commit `93a0cdbf973' in Kotlin Git repository.
|
||||
(gradle-kotlin-legacy
|
||||
,(rx bol
|
||||
(| (group "w") ; 1: warning
|
||||
(group (in "iv")) ; 2: info
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue