[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 2788557 1/2: Support shellcheck in compilation-mode
From: |
Stefan Kangas |
Subject: |
master 2788557 1/2: Support shellcheck in compilation-mode |
Date: |
Mon, 21 Sep 2020 20:45:30 -0400 (EDT) |
branch: master
commit 2788557000d91fb2a928286512c0871e64c6d79b
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
Support shellcheck in compilation-mode
* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Add shellcheck regexp.
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data):
(compile-test-error-regexps): Add test for shellcheck.
* etc/compilation.txt: Add shellcheck example.
* etc/NEWS: Announce the change.
foo
---
etc/NEWS | 3 +++
etc/compilation.txt | 8 ++++++++
lisp/progmodes/compile.el | 3 +++
test/lisp/progmodes/compile-tests.el | 5 ++++-
4 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index 6bfe45a..a4c8230 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -690,6 +690,9 @@ required, but the recommended solution is to use a
correctly matching
regexp instead.
---
+*** Messages from ShellCheck are now recognized.
+
+---
*** Messages from Visual Studio that mention column numbers are now recognized.
** Hi Lock mode
diff --git a/etc/compilation.txt b/etc/compilation.txt
index 11aefc6..df0b82e 100644
--- a/etc/compilation.txt
+++ b/etc/compilation.txt
@@ -536,6 +536,14 @@ cc-1070 cc: WARNING File = linkl.c, Line = 38
cf90-113 f90comp: ERROR NSE, File = Hoved.f90, Line = 16, Column = 3
+* ShellCheck
+
+In autogen.sh line 38:
+autoconf_min=`sed -n 's/^ *AC_PREREQ(\([0-9\.]*\)).*/\1/p' configure.ac`
+^----------^ SC2034: autoconf_min appears unused. Verify use (or export if
used externally).
+ ^-- SC2006: Use $(...) notation instead of legacy backticked
`...`.
+
+
* Sun Ada (VADS, Solaris)
symbol: sun-ada
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 7ac5405..06bdd1e 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -449,6 +449,9 @@ during global destruction\\.$\\)" 1 2)
\\([0-9]+\\) of file://\\(.+\\)"
4 2 3 (1))
+ (shellcheck
+ "^In \\(.+\\) line \\([0-9]+\\):" 1 2)
+
(sparc-pascal-file
"^\\w\\w\\w \\w\\w\\w +[0-3]?[0-9] +[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\
[12][09][0-9][0-9] +\\(.*\\):$"
diff --git a/test/lisp/progmodes/compile-tests.el
b/test/lisp/progmodes/compile-tests.el
index 819f2e7..45eebac 100644
--- a/test/lisp/progmodes/compile-tests.el
+++ b/test/lisp/progmodes/compile-tests.el
@@ -324,6 +324,9 @@
1 8 71 "/home/reto/test/group.xml")
("Warning: Start tag for undeclared element geroup\nin unnamed entity at
line 4 char 8 of file:///home/reto/test/group.xml"
1 8 4 "/home/reto/test/group.xml")
+ ;; shellcheck
+ ("In autogen.sh line 48:"
+ 1 nil 48 "autogen.sh")
;; sparc-pascal-file sparc-pascal-line sparc-pascal-example
("Thu May 14 10:46:12 1992 mom3.p:"
1 nil nil "mom3.p")
@@ -436,7 +439,7 @@ The test data is in `compile-tests--test-regexps-data'."
(compilation-num-warnings-found 0)
(compilation-num-infos-found 0))
(mapc #'compile--test-error-line compile-tests--test-regexps-data)
- (should (eq compilation-num-errors-found 95))
+ (should (eq compilation-num-errors-found 96))
(should (eq compilation-num-warnings-found 35))
(should (eq compilation-num-infos-found 28)))))