GNU bug report logs - #71844
[PATCH] 29.1; "cucumber" in compilation-error-regexp-alist-alist is too aggressive

Previous Next

Package: emacs;

Reported by: Matthew Bauer <mjbauer95 <at> gmail.com>

Date: Sat, 29 Jun 2024 22:33:04 UTC

Severity: wishlist

Tags: patch

Full log


Message #13 received at 71844 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Matthew Bauer <mjbauer95 <at> gmail.com>
Cc: Mattias Engdegård <mattias.engdegard <at> gmail.com>,
 71844 <at> debbugs.gnu.org
Subject: Re: bug#71844: [PATCH] 29.1;
 "cucumber" in compilation-error-regexp-alist-alist is too aggressive
Date: Tue, 4 Mar 2025 02:15:10 +0000
Matthew Bauer <mjbauer95 <at> gmail.com> writes:

> I believe this regex for cucumber is not precise enough. Specifically,
> it was picking up this indentation in an error message from GHC:
>
> Main.hs:195:1: error: [GHC-44432]
>     The type signature for ‘apathway’ lacks an accompanying binding
>     Suggested fix:
>       Perhaps use one of these:
>         ‘foo’ (Defined at Main.hs:196:1),
>         ‘foo’ (Defined at Main.hs:216:1)
>
> It picked up this as being error messages which I believe it shouldn’t have:
>
>    ‘foo’ (Defined at Main.hs:216
>    ‘foo’ (Defined at Main.hs:216
>
> This change just ignores it if there is remaining space. Probably it
> still needs to be refined, but this at least avoids this false positive
> for me.

Mattias, maybe you have some comments on this one?

>>From 3a5e45ec2d836a38348e802c441d567e070b138c Mon Sep 17 00:00:00 2001
> From: Matthew Bauer <mjbauer95 <at> gmail.com>
> Date: Sat, 29 Jun 2024 14:45:35 -0500
> Subject: [PATCH] Try to limit false positives for cucumber compilation
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> I believe this regex for cucumber is not precise enough. Specifically,
> it was picking up this indentation in an error message from GHC:
>
> Main.hs:195:1: error: [GHC-44432]
>     The type signature for ‘apathway’ lacks an accompanying binding
>     Suggested fix:
>       Perhaps use one of these:
>         ‘foo’ (Defined at Main.hs:196:1),
>         ‘foo’ (Defined at Main.hs:216:1)
>
> It picked up this as being error messages which I believe it shouldn’t have:
>
>    ‘foo’ (Defined at Main.hs:216
>    ‘foo’ (Defined at Main.hs:216
>
> This change just ignores it if there is remaining space. Probably it
> still needs to be refined, but this at least avoids this false positive
> for me.
> ---
>  lisp/progmodes/compile.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
> index 2e4eb11811a..a03f1935971 100644
> --- a/lisp/progmodes/compile.el
> +++ b/lisp/progmodes/compile.el
> @@ -473,7 +473,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
>                     "     "))
>               "#")
>            " "
> -          (group (not "(") (* nonl))          ; file
> +          (group (not (in "( ")) (* nonl))          ; file
>            ":"
>            (group (in "1-9") (* (in "0-9"))))  ; line
>       1 2)




This bug report was last modified 158 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.