GNU bug report logs - #74786
[PATCH] Add custom args to test compile step

Previous Next

Package: emacs;

Reported by: "O'Brien, Will" <will.08rien <at> gmail.com>

Date: Wed, 11 Dec 2024 11:29:02 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "O'Brien, Will" <will.08rien <at> gmail.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Randy Taylor <dev <at> rjt.dev>, Eli Zaretskii <eliz <at> gnu.org>, 74786 <at> debbugs.gnu.org
Subject: bug#74786: [PATCH] Add custom args to test compile step
Date: Wed, 11 Dec 2024 16:31:49 +0000
[Message part 1 (text/plain, inline)]
On Wed, Dec 11 2024 at 16:58, Robert Pluim <rpluim <at> gmail.com> wrote:

>>>>>> On Wed, 11 Dec 2024 17:45:59 +0200, Eli Zaretskii <eliz <at> gnu.org> said:
>
> Iʼm not Randy, but:
>
>     >> +(defun go-ts-mode--get-test-args ()
>     >> +  "Return the test args.
>     >> +This function respects the `go-ts-mode-test-args' variable for
>     >> +specifying test args, such as adding coverage file."
>     >> +  (if go-ts-mode-test-args
>     >> +      (string-join go-ts-mode-test-args)
>     >> +    ""))
>     >> +
>
> This entire function is not needed, since
>
> (string-join nil) => ""
>
>     >>  (defun go-ts-mode--compile-test (regexp)
>     >>    "Compile the tests matching REGEXP.
>     >>  This function respects the `go-ts-mode-build-tags' variable for
>     >>  specifying build tags."
>     >> -  (compile (format "go test -v %s -run '%s'"
>     >> +  (compile (format "go test %s -v %s -run '%s'"
>     >> +                   (go-ts-mode--get-test-args)
>     >>                     (go-ts-mode--get-build-tags-flag)
>     >>                     regexp)))
>     >> 
>
> so you could just inline the `string-join' here.

Ah, thanks!  I've attached a new patch with the simplification.

best
--
will

[0001-Add-custom-args-to-test-compile-step.patch (text/x-patch, attachment)]

This bug report was last modified 136 days ago.

Previous Next


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