unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Randy Taylor <dev@rjt.dev>
To: Ankit Gadiya <ankit@argp.in>
Cc: Eli Zaretskii <eliz@gnu.org>, 70939@debbugs.gnu.org
Subject: bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode
Date: Thu, 16 May 2024 02:32:42 +0000	[thread overview]
Message-ID: <TGzZdTWKM_xDC3-xh0MWgdcpDpzSyRpismuCvIM_1rpOnhKE9eMr56fCP21LnGkkhcXBMpNCxWOPTBugPkOZt0qXCXuj_9VdSYPb-uRyi9g=@rjt.dev> (raw)
In-Reply-To: <CAN7zea3bU6NjLrgz=g8FdUrwmBFpq88WGPcg8goROcftivz0Ow@mail.gmail.com>

On Wednesday, May 15th, 2024 at 00:55, Ankit Gadiya <ankit@argp.in> wrote:
> 
> 
> > This is going to need a commit log entry. See the "Commit messages" section
> 
> > in the CONTRIBUTING file.
> 
> 
> I missed it earlier, will add it.
> 
> > I'm undecided on the keybinds. I think I would prefer something like:
> > C-c t p
> > or
> > C-c C-t p
> > so we can keep test-related things together.
> 
> 
> Keeping it under C-c C-t makes sense to me. How about this:
> 
> C-c C-t t - go-ts-mode-test-function-at-point
> C-c C-t p - go-ts-mode-test-package

Sounds good.

I'm wondering If C-c C-t t should be f for "function" but let's leave it as t for now. I do like the t for test which is nice and simple. Decisions, decisions...

> 
> > I haven't tried this out yet, but here are some comments (mostly nits)
> > after a quick look:
> > 
> > In NEWS, sentences should be separated by 2 spaces.
> > 
> > +The 'go-ts-mode-test-function-at-point' command runs unit test at
> > ^the
> > +point.
> > 
> > +This function respects `go-build-tags' buffer-local variable
> > ^the
> > 
> > + "Compiles the tests matching REGEXP.
> > ^Compile
> > 
> > +If the point is anywhere in the test function, that function will be
> > +tested.
> > ^ run (keeps it consistent with the next sentence)
> > 
> > + "Run all the unit tests under current package."
> > ^the
> 
> 
> Thanks, I'll update this along with keybinding changes.

Great. I'll try to give this a try tomorrow.

Eli, is there a convention regarding local variables?
In the patch we have:
+  (if (local-variable-p 'go-build-tags)
+      (format "-tags %s" go-build-tags)
+    ""))

Should that local variable be prefixed with go-ts-mode, or is it fine as is?

> 
> --
> Ankit





  reply	other threads:[~2024-05-16  2:32 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-14 14:04 bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14 16:52 ` Eli Zaretskii
2024-05-14 17:24   ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14 17:59     ` Eli Zaretskii
2024-05-15  2:36 ` Randy Taylor
2024-05-15  4:55   ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-16  2:32     ` Randy Taylor [this message]
2024-05-16  8:27       ` Eli Zaretskii
2024-05-16 15:03         ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-16 16:01           ` Eli Zaretskii
2024-05-18  9:54             ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-25  2:35               ` Randy Taylor
2024-05-28  2:30                 ` Randy Taylor
2024-05-28 19:58                   ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-19 18:17                     ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-21  2:40                       ` Randy Taylor
2024-06-23 14:46                         ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26  2:26                           ` Randy Taylor
2024-06-26 11:27                             ` Eli Zaretskii
2024-06-26 12:31                               ` Randy Taylor
2024-07-06 19:44                             ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-06 22:08                               ` Stefan Kangas
2024-07-06 22:30                                 ` Dmitry Gutov
2024-07-07  7:26                                   ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-10 23:43                               ` Randy Taylor
2024-07-11  7:33                                 ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-11 14:21                                   ` Randy Taylor
2024-07-12  6:23                                     ` Eli Zaretskii
2024-07-12 11:10                                       ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-12 11:21                                         ` Eli Zaretskii
2024-07-21  6:05                                   ` Eli Zaretskii
2024-06-23 14:56                         ` Eli Zaretskii
2024-05-17  2:27       ` Randy Taylor
2024-05-18  8:55         ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-15 11:21   ` Eli Zaretskii
2024-05-16  1:24     ` Randy Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='TGzZdTWKM_xDC3-xh0MWgdcpDpzSyRpismuCvIM_1rpOnhKE9eMr56fCP21LnGkkhcXBMpNCxWOPTBugPkOZt0qXCXuj_9VdSYPb-uRyi9g=@rjt.dev' \
    --to=dev@rjt.dev \
    --cc=70939@debbugs.gnu.org \
    --cc=ankit@argp.in \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).