From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Randy Taylor Newsgroups: gmane.emacs.bugs Subject: bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode Date: Thu, 16 May 2024 02:32:42 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17231"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 70939@debbugs.gnu.org To: Ankit Gadiya Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 16 04:33:34 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s7Qw1-0004CG-Jp for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 May 2024 04:33:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7QvZ-0005K6-Q8; Wed, 15 May 2024 22:33:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7QvX-0005Js-IH for bug-gnu-emacs@gnu.org; Wed, 15 May 2024 22:33:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7QvU-0006b7-Iu for bug-gnu-emacs@gnu.org; Wed, 15 May 2024 22:33:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7QvW-0003RH-Cn for bug-gnu-emacs@gnu.org; Wed, 15 May 2024 22:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Randy Taylor Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 May 2024 02:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70939 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70939-submit@debbugs.gnu.org id=B70939.171582677613210 (code B ref 70939); Thu, 16 May 2024 02:33:02 +0000 Original-Received: (at 70939) by debbugs.gnu.org; 16 May 2024 02:32:56 +0000 Original-Received: from localhost ([127.0.0.1]:45833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7QvP-0003R0-Ll for submit@debbugs.gnu.org; Wed, 15 May 2024 22:32:55 -0400 Original-Received: from mail-4018.proton.ch ([185.70.40.18]:34597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7QvN-0003Qo-8x for 70939@debbugs.gnu.org; Wed, 15 May 2024 22:32:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail2; t=1715826765; x=1716085965; bh=uzRbNQoo6jtTTj+zShutrp6wHFDPANfJyk8KJ05KUsM=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=KiOG2jOawHHDpAhONzeWY4kmLC541J5XGNA5GXBLytxH1EIHphG5gtsO8HcS7wloC MC+kU22bhPQgeVwz3+5HvUV7pu9gGxiQfx/fqEseQc7EnMcdm6Z6cHbbLZzz74JtKC Bgpw5FirczwmV64ZXVUjRchMa7Sjbz1vXg0CC7FxFy0lue5h4HpGw8bVSTd+8JfvPr phxNqhJh4OoRr7iZympNFcSCEEROTZpn/ElfTV0IWYpdCF3aPy+4sh1pVMxTfIwwqR ZvXCB8y7h6ue92+G3eARsXAMHIGd9EOSwL89IL1gwvjXVyhYZiwO2so1LrsT7vnzmR PE4G9P9vId+3A== In-Reply-To: Feedback-ID: 44397038:user:proton X-Pm-Message-ID: e77519f380b90caf89a7e1cb47388e3402b00ba5 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285128 Archived-At: On Wednesday, May 15th, 2024 at 00:55, Ankit Gadiya wrote: >=20 >=20 > > This is going to need a commit log entry. See the "Commit messages" sec= tion >=20 > > in the CONTRIBUTING file. >=20 >=20 > I missed it earlier, will add it. >=20 > > 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. >=20 >=20 > Keeping it under C-c C-t makes sense to me. How about this: >=20 > 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, d= ecisions... >=20 > > I haven't tried this out yet, but here are some comments (mostly nits) > > after a quick look: > >=20 > > In NEWS, sentences should be separated by 2 spaces. > >=20 > > +The 'go-ts-mode-test-function-at-point' command runs unit test at > > ^the > > +point. > >=20 > > +This function respects `go-build-tags' buffer-local variable > > ^the > >=20 > > + "Compiles the tests matching REGEXP. > > ^Compile > >=20 > > +If the point is anywhere in the test function, that function will be > > +tested. > > ^ run (keeps it consistent with the next sentence) > >=20 > > + "Run all the unit tests under current package." > > ^the >=20 >=20 > 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= ? >=20 > -- > Ankit