From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: Flymake backends Date: Mon, 17 Apr 2023 13:21:16 +0000 Message-ID: <87fs8yir03.fsf@posteo.net> References: <87wn2btz63.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4658"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, mohkalex@gmail.com To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 17 15:21:42 2023 Return-path: Envelope-to: ged-emacs-devel@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 1poOne-000156-5Y for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Apr 2023 15:21:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1poOmu-0000mY-OI; Mon, 17 Apr 2023 09:20:56 -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 1poOms-0000mJ-Jt for emacs-devel@gnu.org; Mon, 17 Apr 2023 09:20:54 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1poOmn-0000nT-1x for emacs-devel@gnu.org; Mon, 17 Apr 2023 09:20:54 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D3E75240181 for ; Mon, 17 Apr 2023 15:20:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1681737646; bh=jyP3BI7ZlP14/+rNtvWntM6OpYODdND3/3NnbaxaCXM=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=VCPNw3bWc7EwjLxEd8DaVK5UDpXecSmNT54lyaLpDxcH2GPyIVvqNgp0rkUfA83j6 hlwtIesMiCKtmZ+TwLvqPEFWP+n5OKB7Euk+yj3K+dw6qQDcbe2BFznh29Ikt3yHZX f16HIYXFZpOnS3Okqv/1ACKR9MnnyE7YqkUTYwBzJ6OY9imCiWJlRYV8NPNjpwF+3I JPzO5RHWf49sZVMVB/a51eL2hSKj5JtHpFs8n0tUNSBbZrgH7qU87jwnaVU3Lf5ijQ JjkiXp0aQXkyNJ6X+dM7X/HNyy5DyXjs6RxaAr6LfDdmlvRUb6a46EMuF/iMV8gwUW cQybQ/faxzMFg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q0SNZ2xnLz6twQ; Mon, 17 Apr 2023 15:20:46 +0200 (CEST) In-Reply-To: (Ergus's message of "Sun, 16 Apr 2023 22:35:57 +0200") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305363 Archived-At: Ergus writes: > Hi Philip: > > > On Sun, Apr 16, 2023 at 07:17:08PM +0000, Philip Kaludercic wrote: >>Ergus writes: >> >> >>There has been an attempt at abstracting over the current API in this >>project: https://github.com/mohkale/flymake-collection >> > > Thanks for replying. I am looking the flymake-collection project and I > think that this is the kind of api we should offer to the user for > applications development. Even that one or a simplified version of that. > > But sadly the project is not in elpa... so what should we do for that? The topic was brought up https://github.com/mohkale/flymake-collection/issues/2, and unless I was mistaken, the author (Mohsin) has recently requested the CA. I (hope to) have CC'ed him in this message, so he can comment on the issue. My personal opinion is that the current macro[0] is too brittle, and it would make sense to re-think the specific approach. Perhaps it could be translated into a function, or we could make use of generic functions/vc-like polymorphism to simplify the code. [0] https://github.com/mohkale/flymake-collection/blob/release/src/flymake-collection-define.el#L134 >>> Because there are multiple functions the flymake code to simplify common >>> tasks, but they are intended for private use cases. >>> >>> It may simplify integration with other build systems like ninja or >>> cmake. >>> >>> So far something like flymake-quickdef, may help... >>> >>> 2) Is it desirable to add built-in backends to flymake for common/simple >>> tools generally available like cppcheck, flake and so on... to improve >>> the default experience and minimize configuration? >> >>I think that is of interest. In Emacs 29 shellcheck was added for >>instance, and I don't see why other systems shouldn't be supported >>either (setting aside legal issues). > > Then I think we should first provide a simpler api that we can maintain > better (i.e. bring functions like flymake-collection-define-rx to > vanilla) > > And then we can make a list of the common backends we can support: > > So far we only need to give a look to the backends supported by flycheck. This might also be a useful starting point: https://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis. It conveniently lists the licences each program is distributed under. I think it would be productive to focus on languages that do not have LSP support, as Eglot usually does a good job at helping out there. Things like configuration files might be good candidates. >>> Best, >>> Ergus