diff options
Diffstat (limited to 'contrib/scripts/check-texinfo.awk.in')
-rwxr-xr-x | contrib/scripts/check-texinfo.awk.in | 59 |
1 files changed, 59 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..37e2c9f20 --- /dev/null +++ b/contrib/scripts/check-texinfo.awk.in | |||
@@ -0,0 +1,59 @@ | |||
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 | |||
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 | } | ||