summaryrefslogtreecommitdiff
path: root/contrib/scripts/check-texinfo.awk.in
blob: 12f71b5d2df7b3be0ab2761ea0ed0c30452ac25e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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 ;
  }
}