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: Tue, 28 May 2024 02:30:18 +0000 Message-ID: References: <868r0ajh5j.fsf@gnu.org> <86bk55iw54.fsf@gnu.org> 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="32187"; 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 Tue May 28 04:31:22 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 1sBmcT-0008Fp-8N for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 May 2024 04:31:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBmc7-0006wv-Ax; Mon, 27 May 2024 22:30:59 -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 1sBmc2-0006w9-DP for bug-gnu-emacs@gnu.org; Mon, 27 May 2024 22:30:57 -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 1sBmc1-00024X-JH for bug-gnu-emacs@gnu.org; Mon, 27 May 2024 22:30:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sBmcA-0003h3-JL for bug-gnu-emacs@gnu.org; Mon, 27 May 2024 22:31: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: Tue, 28 May 2024 02:31: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.171686344014169 (code B ref 70939); Tue, 28 May 2024 02:31:02 +0000 Original-Received: (at 70939) by debbugs.gnu.org; 28 May 2024 02:30:40 +0000 Original-Received: from localhost ([127.0.0.1]:45499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBmbn-0003gS-QD for submit@debbugs.gnu.org; Mon, 27 May 2024 22:30:40 -0400 Original-Received: from mail-4317.proton.ch ([185.70.43.17]:43157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBmbk-0003gD-1t for 70939@debbugs.gnu.org; Mon, 27 May 2024 22:30:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail2; t=1716863420; x=1717122620; bh=8DRACdwWWg1Wg3dNCGkRj52JrVOeTTJLmH26tWLB2E0=; 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=PQNOPfvrBelWszu9oaM440BN3eRs5e3jctIScWj3Vt4rnEdkKpyvcsOb7V1S7JO6t VHcr6zXD4S4R2RvM3tf47VSTvCbH4hVBm0nPpNEIpTpkICii8nBmo06zyY+ZfxvGeg NjpnLWvR1doO3DUyLFmUm8wXkwbtEED601GtrcWOOfsoVCqoKw8n7vfB6mKrrZASLB tfIhHu7HamNf4II9Dk23TKXR5GsN8tV+YpsW8shrbr2i2Og28aes45mofgITapmvyx je2KLg3AIDTCvDI2OQLPBWaTXITCO3okvHkJi3LQ4KTBChdmojHSFaqVpibHXcd7jS zMhpRcAsWl5vg== In-Reply-To: Feedback-ID: 44397038:user:proton X-Pm-Message-ID: 988c5a5aca8fb69028c5c94c819eb68be4eed8d6 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:286074 Archived-At: On Friday, May 24th, 2024 at 22:35, Randy Taylor wrote: >=20 > On Saturday, May 18th, 2024 at 05:54, Ankit Gadiya via "Bug reports for G= NU Emacs, the Swiss army knife of text editors" bug-gnu-emacs@gnu.org wrote= : >=20 > > [...] > >=20 > > I'm submitting an updated Patch with the following changes: > > * Add commit log > > * Fix the text formatting. > > * Update the keybindings to use the C-c C-t prefix. > > * Improve regexp matching to be more strict. > > * Define =3Dgo-ts-mode-build-tags=3D variable in the module and use it = in the test > > functions. > >=20 > > -- > > Ankit >=20 >=20 > Thanks. >=20 > Sorry for the delay in reviewing, I've been having internet troubles sinc= e last Friday. I'll take a look at this next week. >=20 > A few quick things I noticed on a glance: >=20 > + (let* ((node (go-ts-mode--find-defun-at start)) > + (name (treesit-defun-name node)) >=20 > Indentation is off on the name line - looks like a TAB was used? Should o= nly be spaces everywhere. Double check the rest is OK. >=20 > +region. It is bound to 'C-c C-t' in 'go-ts-mode'. > ^ C-c C-t t >=20 > +package of the current buffer. It is bound to 'C-c C-p' in 'go-ts-mode'. > ^ C-c C-t p >=20 > + "List of go build tags for the test commands." > ^ Go >=20 > + "Return a list with names of all defuns in the range." > We should probably say what the range actually is (START to END) - not su= re if we have a convention for that wording already. A few more nits: + "Return compile flag for build tags. ^ the +This function respects `go-ts-mode-build-tags' variable for specifying ^ the + "Return a list with names of all defuns in the range." ^ the Indentation is also off in go-ts-mode-test-function-at-point. When we run C-c C-t t outside of a function, we get: go test -v -run '^nil$' Should we maybe not bother running anything at all? What do you think? Do we know how other packages behave under similar circumstances?