From dd2699b541c0a0c8f1962ae1a0dcef6cd92fbc43 Mon Sep 17 00:00:00 2001 From: ng0 Date: Tue, 5 Mar 2019 21:21:40 +0000 Subject: Add initial check-texinfo rule. Maybe this should be moved to doc later on --- Makefile.am | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 3c1d8c8fc..7d6084d96 100644 --- a/Makefile.am +++ b/Makefile.am @@ -43,4 +43,25 @@ check-man: printf "Running lint-man.sh in doc/man.\n" @cd $(top_srcdir)/doc/man ; $(top_srcdir)/../../contrib/scripts/lint-man.sh || true -check-linters: check-bashism check-python check-man +check-texinfo: + printf "Running basic texinfo linters\n" + printf "...line length over 79 chars?\n" 2>&1 | tee $(top_srcdir)/doc/handbook/texinfo_handbook.log || true + @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk 'length>79 {print FILENAME":"NR":"$$0}' > $(top_srcdir)/texinfo_handbook.log || true + printf "...line length over 79 chars?\n" 2>&1 | tee $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true + @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk 'length>79 {print FILENAME":"NR":"$$0}' > $(top_srcdir)/texinfo_tutorial.log || true + printf "...lines containing macros incompatible with old makeinfo?\n" 2>&1 | tee -a $(top_srcdir)/doc/handbook/texinfo_handbook.log || true + @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/@geq\{\}/ {print FILENAME":"NR":"$$0}' >> $(top_srcdir)/texinfo_handbook.log || true + printf "...lines containing macros incompatible with old makeinfo?\n" 2>&1 | tee -a $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true + @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/@geq\{\}/ {print FILENAME":"NR":"$$0}' >> $(top_srcdir)/texinfo_tutorial.log || true + printf "...lines containing macros incompatible with texi2mdoc?\n" 2>&1 | tee -a $(top_srcdir)/doc/handbook/texinfo_handbook.log || true + @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/@footnote\{/ {print FILENAME":"NR":"$$0}' >> $(top_srcdir)/texinfo_handbook.log || true + printf "...lines containing macros incompatible with texi2mdoc?\n" 2>&1 | tee -a $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true + @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/@footnote\{/ {print FILENAME":"NR":"$$0}' >> $(top_srcdir)/texinfo_tutorial.log || true + printf "...lines telling us what is left TODO or to fix?\n" 2>&1 | tee -a $(top_srcdir)/doc/handbook/texinfo_handbook.log || true + @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/TODO/ {print FILENAME":"NR":"$$0}' >> $(top_srcdir)/texinfo_handbook.log || true + @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/XXX/ {print FILENAME":"NR":"$$0}' >> $(top_srcdir)/texinfo_handbook.log || true + printf "...lines telling us what is left TODO or to fix?\n" 2>&1 | tee -a $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true + @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/TODO/ {print FILENAME":"NR":"$$0}' >> $(top_srcdir)/texinfo_tutorial.log || true + @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/XXX/ {print FILENAME":"NR":"$$0}' >> $(top_srcdir)/texinfo_tutorial.log || true + +check-linters: check-bashism check-python check-man check-texinfo -- cgit v1.2.3