check-texinfo: add "the the"
[oweals/gnunet.git] / contrib / scripts / check-texinfo.awk.in
1 #!@AWKEXE@ -f
2 #
3 # Dedicated to the Public Domain.
4 # SPDX-License-Identifier: 0BSD
5 #
6 # exception to add: ignore license files.
7 # exception to add: uref's can go above 79 chars.
8 # write functions to avoid more text if possible.
9
10 BEGIN {
11   printf "Running basic texinfo linters\n" ;
12 }
13
14 {
15     if(/\t/) {
16       printf "...lines containing tabstops?\n" ;
17       print FILENAME":"NR":"$0 ;
18     }
19 }
20
21 {
22     if(length>79) {
23       printf "...line length over 79 chars?\n" ;
24       print FILENAME":"NR":"$0 ;
25     }
26 }
27
28 {
29   if(/@geq\{\}/) {
30     printf "...lines containing macros incompatible with old makeinfo?\n" ;
31     print FILENAME":"NR":"$0 ;
32   }
33 }
34
35 {
36   if (/@footnote\{/) {
37     printf "...lines containing macros incompatible with texi2mdoc?\n" ;
38     print FILENAME":"NR":"$0 ;
39   }
40 }
41
42 {
43   if (/TODO/) {
44     printf "...lines telling us what is left TODO?\n" ;
45     print FILENAME":"NR":"$0 ;
46   }
47
48   if (/XXX/) {
49     printf "...lines telling us what is left to fix?\n" ;
50     print FILENAME":"NR":"$0 ;
51   }
52 }
53
54 {
55   if (/wether/) {
56     printf "...lines containing a popular typo\n" ;
57     print FILENAME":"NR":"$0 ;
58   }
59
60   if (/the the/) {
61     printf "...lines containing a popular typo\n" ;
62     print FILENAME":"NR":"$0 ;
63   }
64 }