From: Mattias EngdegÄrd Date: Tue, 24 Nov 2020 11:05:47 +0000 (+0100) Subject: Make the 'cucumber' compilation pattern work without 'omake' X-Git-Tag: emacs-28.0.90~5006 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8ebf041d5f54d9ae0dd360d9d3b3f82c5c7e3106;p=emacs.git Make the 'cucumber' compilation pattern work without 'omake' When 'omake' is included in compilation-error-regexp-alist, which it still is by default, then all other rules are modified to match with an extra leading 6 spaces as well. The 'cucumber' pattern relied on this in order to work as intended. * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Extend the 'cucumber' pattern so that it works even when 'omake' is not included. Move it below the 'gnu' rule so that it doesn't match anything else. --- diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index de9c9a209d1..787f5d5ef30 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -214,10 +214,6 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) "^\"\\([^,\" \n\t]+\\)\", line \\([0-9]+\\)\ \\(?:[(. pos]+\\([0-9]+\\))?\\)?[:.,; (-]\\( warning:\\|[-0-9 ]*(W)\\)?" 1 2 3 (4)) - (cucumber - "\\(?:^cucumber\\(?: -p [^[:space:]]+\\)?\\|#\\)\ -\\(?: \\)\\([^(].*\\):\\([1-9][0-9]*\\)" 1 2) - (msft ;; Must be before edg-1, so that MSVC's longer messages are ;; considered before EDG. @@ -399,6 +395,17 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) (regexp "[0-9][0-9][0-9]"))) 1 (2 . 4) (3 . 5) (6 . 7)) + (cucumber + ,(rx (| (: bol + (| (: "cucumber" (? " -p " (+ (not space)))) + " ")) + "#") + " " + (group (not "(") (* nonl)) ; file + ":" + (group (in "1-9") (* (in "0-9")))) ; line + 1 2) + (lcc "^\\(?:E\\|\\(W\\)\\), \\([^(\n]+\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" 2 3 4 (1)) diff --git a/test/lisp/progmodes/compile-tests.el b/test/lisp/progmodes/compile-tests.el index 0288cba789e..74d7c7682e1 100644 --- a/test/lisp/progmodes/compile-tests.el +++ b/test/lisp/progmodes/compile-tests.el @@ -124,6 +124,8 @@ ;; cucumber (cucumber "Scenario: undefined step # features/cucumber.feature:3" 29 nil 3 "features/cucumber.feature") + ;; This rule is actually handled by the `cucumber' pattern but when + ;; `omake' is included, then `gnu' matches it first. (gnu " /home/gusev/.rvm/foo/bar.rb:500:in `_wrap_assertion'" 1 nil 500 "/home/gusev/.rvm/foo/bar.rb") ;; edg-1 edg-2