GNU bug report logs - #70260
[PATCH] Flymake support for rust-ts-mode (clippy-driver)

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dmitry <at> gutov.dev>

Date: Sun, 7 Apr 2024 16:44:02 UTC

Severity: normal

Tags: patch

Fixed in version 30.1

Done: Dmitry Gutov <dmitry <at> gutov.dev>

To reply to this bug, email your comments to 70260 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to dev <at> rjt.dev, bug-gnu-emacs <at> gnu.org:
bug#70260; Package emacs. (Sun, 07 Apr 2024 16:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Gutov <dmitry <at> gutov.dev>:
New bug report received and forwarded. Copy sent to dev <at> rjt.dev, bug-gnu-emacs <at> gnu.org. (Sun, 07 Apr 2024 16:44:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Flymake support for rust-ts-mode (clippy-driver)
Date: Sun, 7 Apr 2024 19:42:44 +0300
[Message part 1 (text/plain, inline)]
X-Debbugs-Cc: Randy Taylor <dev <at> rjt.dev>

Hi Randy and others,

Here's a patch adding rust-ts-mode <-> flymake-mode integration using 
clippy.

Feedback welcome.
[rust-ts-flymake.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70260; Package emacs. (Mon, 08 Apr 2024 00:28:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: 70260 <at> debbugs.gnu.org
Cc: randy taylor <dev <at> rjt.dev>
Subject: Re: bug#70260: [PATCH] Flymake support for rust-ts-mode
 (clippy-driver)
Date: Mon, 8 Apr 2024 03:26:30 +0300
[Message part 1 (text/plain, inline)]
Minor fix and a TODO comment for the "cargo clippy" case.

On 07/04/2024 19:42, Dmitry Gutov wrote:
> X-Debbugs-Cc: Randy Taylor <dev <at> rjt.dev>
> 
> Hi Randy and others,
> 
> Here's a patch adding rust-ts-mode <-> flymake-mode integration using 
> clippy.
> 
> Feedback welcome.
[rust-ts-flymake-v2.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70260; Package emacs. (Tue, 09 Apr 2024 02:43:02 GMT) Full text and rfc822 format available.

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

From: Randy Taylor <dev <at> rjt.dev>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 70260 <at> debbugs.gnu.org
Subject: Re: bug#70260: [PATCH] Flymake support for rust-ts-mode
 (clippy-driver)
Date: Tue, 09 Apr 2024 02:42:15 +0000
On Sunday, April 7th, 2024 at 20:26, Dmitry Gutov <dmitry <at> gutov.dev> wrote:
> 
> 
> Minor fix and a TODO comment for the "cargo clippy" case.
> 
> On 07/04/2024 19:42, Dmitry Gutov wrote:
> 
> > X-Debbugs-Cc: Randy Taylor dev <at> rjt.dev
> > 
> > Hi Randy and others,
> > 
> > Here's a patch adding rust-ts-mode <-> flymake-mode integration using
> > clippy.
> > 
> > Feedback welcome.

Thanks for working on this.

I'm not really familiar with flymake integration, but this
looks good to me. I have a few nits below.

+(defcustom rust-ts-flymake-command '("clippy-driver" "-")
+  "The external tool that will be used to perform the syntax check.
                                                   ^^^^^^^^^^^^^^^^
                                                   maybe just "the check"?
Or something similar, since more is being done than just syntax checking.

+This is a non empty list of strings, the checker tool possibly followed
           ^^^^^^^^^                ^
           non-empty?               A colon would work well here.

+(defvar rust-ts--flymake-proc nil)
Should this be defvar-local?

+    ;; Flymake
               ^
               A period at the end would make me happy :).




Reply sent to Dmitry Gutov <dmitry <at> gutov.dev>:
You have taken responsibility. (Tue, 09 Apr 2024 19:43:02 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Gutov <dmitry <at> gutov.dev>:
bug acknowledged by developer. (Tue, 09 Apr 2024 19:43:02 GMT) Full text and rfc822 format available.

Message #16 received at 70260-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Randy Taylor <dev <at> rjt.dev>
Cc: 70260-done <at> debbugs.gnu.org
Subject: Re: bug#70260: [PATCH] Flymake support for rust-ts-mode
 (clippy-driver)
Date: Tue, 9 Apr 2024 22:41:58 +0300
Version: 30.1

On 09/04/2024 05:42, Randy Taylor wrote:
> On Sunday, April 7th, 2024 at 20:26, Dmitry Gutov <dmitry <at> gutov.dev> wrote:
>>
>>
>> Minor fix and a TODO comment for the "cargo clippy" case.
>>
>> On 07/04/2024 19:42, Dmitry Gutov wrote:
>>
>>> X-Debbugs-Cc: Randy Taylor dev <at> rjt.dev
>>>
>>> Hi Randy and others,
>>>
>>> Here's a patch adding rust-ts-mode <-> flymake-mode integration using
>>> clippy.
>>>
>>> Feedback welcome.
> 
> Thanks for working on this.

Thanks for taking a look.

I imagine it won't be used for larger projects, edited assisted by LSP - 
LSP clients have their own Flymake integration. But I found it useful a 
few months ago when doing some leetcode exercises.

> I'm not really familiar with flymake integration, but this
> looks good to me. I have a few nits below.
> 
> +(defcustom rust-ts-flymake-command '("clippy-driver" "-")
> +  "The external tool that will be used to perform the syntax check.
>                                                     ^^^^^^^^^^^^^^^^
>                                                     maybe just "the check"?
> Or something similar, since more is being done than just syntax checking.
> 
> +This is a non empty list of strings, the checker tool possibly followed
>             ^^^^^^^^^                ^
>             non-empty?               A colon would work well here.

Thank you. This was actually copied from some exiting flymake backends, 
but they could use such edits as well.

> +(defvar rust-ts--flymake-proc nil)
> Should this be defvar-local?

Not necessarily - there would usually be only one simultaneous check 
running, and the pointer to the associated buffer is stored in the closure.

> +    ;; Flymake
>                 ^
>                 A period at the end would make me happy :).

Sure.

Pushed to master as ccced8c3e43, closing.




This bug report was last modified 24 days ago.

Previous Next


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