From d9132e1cba66b5455a627251f377cd95eb008fc1 Mon Sep 17 00:00:00 2001 From: ng0 Date: Sun, 1 Dec 2019 23:19:58 +0000 Subject: convert texinfo checks to proper awk script, add detection for awk/gawk, remove obsolete code. --- contrib/scripts/check-texinfo.awk.in | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 contrib/scripts/check-texinfo.awk.in (limited to 'contrib/scripts/check-texinfo.awk.in') diff --git a/contrib/scripts/check-texinfo.awk.in b/contrib/scripts/check-texinfo.awk.in new file mode 100755 index 000000000..12f71b5d2 --- /dev/null +++ b/contrib/scripts/check-texinfo.awk.in @@ -0,0 +1,55 @@ +#!@AWKEXE@ -f + +# Dedicated to the Public Domain. +# SPDX-License-Identifier: 0BSD + +BEGIN { + printf "Running basic texinfo linters\n" ; +} + +{ + if(/\t/) { + printf "...lines containing tabstops?\n" ; + print FILENAME":"NR":"$0 ; + } +} + +{ + if(length>79) { + printf "...line length over 79 chars?\n" ; + print FILENAME":"NR":"$0 ; + } +} + +{ + if(/@geq\{\}/) { + printf "...lines containing macros incompatible with old makeinfo?\n" ; + print FILENAME":"NR":"$0 ; + } +} + +{ + if (/@footnote\{/) { + printf "...lines containing macros incompatible with texi2mdoc?\n" ; + print FILENAME":"NR":"$0 ; + } +} + +{ + if (/TODO/) { + printf "...lines telling us what is left TODO?\n" ; + print FILENAME":"NR":"$0 ; + } + + if (/XXX/) { + printf "...lines telling us what is left to fix?\n" ; + print FILENAME":"NR":"$0 ; + } +} + +{ + if (/wether/) { + printf "...lines containing a popular typo\n" ; + print FILENAME":"NR":"$0 ; + } +} -- cgit v1.2.3