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.
This commit is contained in:
Mattias Engdegård 2020-11-24 12:05:47 +01:00
parent 48c747e7a8
commit 8ebf041d5f
2 changed files with 13 additions and 4 deletions

View file

@ -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))

View file

@ -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