diff options
Diffstat (limited to 'contrib/scripts/check-texinfo.awk.in')
-rwxr-xr-x | contrib/scripts/check-texinfo.awk.in | 55 |
1 files changed, 55 insertions, 0 deletions
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 @@ | |||
1 | #!@AWKEXE@ -f | ||
2 | |||
3 | # Dedicated to the Public Domain. | ||
4 | # SPDX-License-Identifier: 0BSD | ||
5 | |||
6 | BEGIN { | ||
7 | printf "Running basic texinfo linters\n" ; | ||
8 | } | ||
9 | |||
10 | { | ||
11 | if(/\t/) { | ||
12 | printf "...lines containing tabstops?\n" ; | ||
13 | print FILENAME":"NR":"$0 ; | ||
14 | } | ||
15 | } | ||
16 | |||
17 | { | ||
18 | if(length>79) { | ||
19 | printf "...line length over 79 chars?\n" ; | ||
20 | print FILENAME":"NR":"$0 ; | ||
21 | } | ||
22 | } | ||
23 | |||
24 | { | ||
25 | if(/@geq\{\}/) { | ||
26 | printf "...lines containing macros incompatible with old makeinfo?\n" ; | ||
27 | print FILENAME":"NR":"$0 ; | ||
28 | } | ||
29 | } | ||
30 | |||
31 | { | ||
32 | if (/@footnote\{/) { | ||
33 | printf "...lines containing macros incompatible with texi2mdoc?\n" ; | ||
34 | print FILENAME":"NR":"$0 ; | ||
35 | } | ||
36 | } | ||
37 | |||
38 | { | ||
39 | if (/TODO/) { | ||
40 | printf "...lines telling us what is left TODO?\n" ; | ||
41 | print FILENAME":"NR":"$0 ; | ||
42 | } | ||
43 | |||
44 | if (/XXX/) { | ||
45 | printf "...lines telling us what is left to fix?\n" ; | ||
46 | print FILENAME":"NR":"$0 ; | ||
47 | } | ||
48 | } | ||
49 | |||
50 | { | ||
51 | if (/wether/) { | ||
52 | printf "...lines containing a popular typo\n" ; | ||
53 | print FILENAME":"NR":"$0 ; | ||
54 | } | ||
55 | } | ||