Add target 'tabcheck', running a quick perl scan of the C source code
for tabs. Note the double dollar sign $$ARGV is because of
Makefile.am escaping.
Add check-security to the top level check-local target.
Add manual.xml validation to the doc/check-local target.
Don't add shellcheck target for now, because it appears to flag lots
of unimportant issues. Perhaps someone more familiar with this tool
can fix it up and add it to check-local later on.
---
Makefile.am | 8 +++++++-
doc/Makefile.am | 3 ++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 68c452b6..4a23e16c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -204,6 +204,8 @@ uninstall-local:
pclean:
cat /dev/null > $(top_srcdir)/PATCHES
+check-local: check-security tabcheck
+
check-security:
(cd $(top_srcdir) && ./check_sec.sh)
@@ -221,4 +223,8 @@ update-doc:
shellcheck:
(find . -name \*.sh && echo "gen_defs muttbug prepare") | xargs
shellcheck --exclude=SC2003,SC2006,SC2086,SC2162,SC2046
-.PHONY: commit pclean check-security shellcheck
+tabcheck:
+ find . -name '*.[ch]' ! -name keymap_defs.h ! -name conststrings.c
-print0 | \
+ xargs -0 perl -n -e '/\t/ && die "tab found in $$ARGV"'
+
+.PHONY: commit pclean check-security shellcheck tabcheck
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 0d68693b..b9ac5b87 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -149,7 +149,6 @@ uninstall-local:
rm -f $(DESTDIR)$(infodir)/mutt.info ; \
fi
-check:
manual.txt: manual.html
-LC_ALL=C lynx -localhost -dump -nolist -nonumbers -with_backspaces
-display_charset=us-ascii manual.html > $@ || \
LC_ALL=C w3m -T text/html -I utf-8 -O utf-8 -dump < manual.html > $@ ||
\
@@ -205,6 +204,8 @@ mutt.texi: stamp-doc-xml
mutt.info: mutt.texi
-$(MAKEINFO) --no-split -o mutt.info mutt.texi
+check-local: validate
+
validate: stamp-doc-xml
xmllint --noout --noblanks --postvalid manual.xml
--
2.53.0