diff options
author | ng0 <ng0@n0.is> | 2019-12-01 23:19:58 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-12-01 23:19:58 +0000 |
commit | d9132e1cba66b5455a627251f377cd95eb008fc1 (patch) | |
tree | d826c9e7793e6c0161d40bc56b577448f22c653c /contrib/scripts/check-texinfo.awk.in | |
parent | 93330d9c6d8d5c599a2f12d641c5029aab91d3ad (diff) | |
download | gnunet-d9132e1cba66b5455a627251f377cd95eb008fc1.tar.gz gnunet-d9132e1cba66b5455a627251f377cd95eb008fc1.zip |
convert texinfo checks to proper awk script, add detection for awk/gawk,
remove obsolete code.
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 | } | ||