From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57884: [PATCH] Flymake backend using the shellcheck program Date: Sat, 17 Sep 2022 20:05:29 +0300 Message-ID: <83bkre0w4m.fsf@gnu.org> References: <87a66yaqwc.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18363"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57884@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 17 19:06:14 2022 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 1oZbGf-0004bM-Py for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Sep 2022 19:06:13 +0200 Original-Received: from localhost ([::1]:57640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZbGe-0005dw-Q5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Sep 2022 13:06:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZbGU-0005cH-Jr for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2022 13:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZbGU-0007op-Bv for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2022 13:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZbGU-0006tb-6d for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2022 13:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Sep 2022 17:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57884 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 57884-submit@debbugs.gnu.org id=B57884.166343433626473 (code B ref 57884); Sat, 17 Sep 2022 17:06:02 +0000 Original-Received: (at 57884) by debbugs.gnu.org; 17 Sep 2022 17:05:36 +0000 Original-Received: from localhost ([127.0.0.1]:47072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZbG4-0006su-0c for submit@debbugs.gnu.org; Sat, 17 Sep 2022 13:05:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZbG2-0006si-KV for 57884@debbugs.gnu.org; Sat, 17 Sep 2022 13:05:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41346) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZbFx-0007iZ-Ec; Sat, 17 Sep 2022 13:05:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=naV3kfYmzZI5vJQhmn1Xe5foFDRbsqTELVUTC1y0tDw=; b=GhfuoPRb1Ko6 LjSPNsg7MYcPc1Bi/MYyP7LPpNx1B08HS/z6iKfTc4ij4P5lIatrzko/Y3bcYgUcbxsD4MofvzKUY EwafFbloPt+oi3U/GN8+qb4BfRgzfajTtd1wQjd7LairCZNgxF3puUs1qCd255BOiugelTcvkDH8X jsW/T4HgNlsdz6NDqPITBgYSZvVKtEc+0mexHZUK7kWQGrpNZVw+h4J2aDclAwJQkjay1PW7hH3I0 4CiQKnCoLXeb4hBSQ4EVqfpqJJQZ3qBAl7FOACva3qZP99s8gZK9Fw1yisbZkiF4g/gXSc3dmm3Kw +EKRFVJGiX6anPX2W+oAvQ==; Original-Received: from [87.69.77.57] (port=4852 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZbFw-0002mk-TC; Sat, 17 Sep 2022 13:05:29 -0400 In-Reply-To: <87a66yaqwc.fsf@gmail.com> (message from Augusto Stoffel on Sat, 17 Sep 2022 18:48:19 +0200) 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" Xref: news.gmane.io gmane.emacs.bugs:242887 Archived-At: > From: Augusto Stoffel > Date: Sat, 17 Sep 2022 18:48:19 +0200 > > See https://www.shellcheck.net/ for details on the ShellCheck program. > It seems to be the most usual linter for shell scripts. Thanks. > * lisp/progmodes/sh-script.el (sh-shellcheck-program, > sh--shellcheck-process, sh-shellcheck-flymake): Variables and function > defining a Flymake backend. > (sh-mode): Add it to 'flymake-diagnostic-functions'. Please mention the bug number in the log message. > +(defcustom sh-shellcheck-command '("shellcheck") > + "The shellcheck program followed by extra arguments." > + :type 'string) This lacks the :version tag. Also, wouldn't it be better to have separate user options for the program and the switches? That way, there won't be a need to require users to provide a list as the value of the option. > +(defun sh-shellcheck-flymake (report-fn &rest _args) > + "Flymake backend using the shellcheck program. The first line of a function's doc string should mention its arguments. And I think this warrants a NEWS entry.