[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11517: 24.0.97; invalid compilation error regexp for maven
From: |
Stefan Monnier |
Subject: |
bug#11517: 24.0.97; invalid compilation error regexp for maven |
Date: |
Mon, 21 May 2012 00:26:30 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
> Example maven error from:
> [ERROR] /Users/cinsk/hello.java:[651,96] ';' expected
> ^^^^^^^^^^^^^^^^^^^^^^^^
Hmm... the current maven regexp doesn't make much sense (it has
a special [0-9]* at the beginning which doesn't seem to make any
difference, other than make the regexp more complex, obviously).
But more importantly, it does not try to match a "[ERROR]".
The current tests we have just include:
;; maven
("FooBar.java:[111,53] no interface expected here"
1 53 111 "FooBar.java")
> (maven "^\\[ERROR\\] +\\(.+?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\].*"
> 1 2 2)
This doesn't match the string we have in our current test, tho.
The patch below seems to fix it for your example. Please try it out,
Stefan
=== modified file 'lisp/progmodes/compile.el'
--- lisp/progmodes/compile.el 2012-05-18 01:46:20 +0000
+++ lisp/progmodes/compile.el 2012-05-21 03:44:37 +0000
@@ -209,7 +209,7 @@
;; due to matching filenames via \\(.*?\\). This might be faster.
(maven
;; Maven is a popular free software build tool for Java.
- "\\([0-9]*[^0-9\n]\\(?:[^\n :]\\| [^-/\n]\\|:[^
\n]\\)*?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\] " 1 2 3)
+ "\\([^ \n]\\(?:[^\n :]\\| [^-/\n]\\|:[^
\n]\\)*?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\] " 1 2 3)
(jikes-line
"^ *\\([0-9]+\\)\\.[ \t]+.*\n +\\(<-*>\n\\*\\*\\*
\\(?:Error\\|Warnin\\(g\\)\\)\\)"