GNU bug report logs -
#11517
24.0.97; invalid compilation error regexp for maven
Previous Next
Reported by: cinsky <at> gmail.com
Date: Sat, 19 May 2012 06:32:02 UTC
Severity: normal
Found in version 24.0.97
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 11517 <at> debbugs.gnu.org (full text, mbox):
> 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\\)\\)\\)"
This bug report was last modified 13 years and 85 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.