check-texinfo.awk.in 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. BEGIN {
  9. printf "Running basic texinfo linters\n" ;
  10. }
  11. {
  12. if(/\t/) {
  13. printf "...lines containing tabstops?\n" ;
  14. print FILENAME":"NR":"$0 ;
  15. }
  16. }
  17. {
  18. if(length>79) {
  19. printf "...line length over 79 chars?\n" ;
  20. print FILENAME":"NR":"$0 ;
  21. }
  22. }
  23. {
  24. if(/@geq\{\}/) {
  25. printf "...lines containing macros incompatible with old makeinfo?\n" ;
  26. print FILENAME":"NR":"$0 ;
  27. }
  28. }
  29. {
  30. if (/@footnote\{/) {
  31. printf "...lines containing macros incompatible with texi2mdoc?\n" ;
  32. print FILENAME":"NR":"$0 ;
  33. }
  34. }
  35. {
  36. if (/TODO/) {
  37. printf "...lines telling us what is left TODO?\n" ;
  38. print FILENAME":"NR":"$0 ;
  39. }
  40. if (/XXX/) {
  41. printf "...lines telling us what is left to fix?\n" ;
  42. print FILENAME":"NR":"$0 ;
  43. }
  44. }
  45. {
  46. if (/wether/) {
  47. printf "...lines containing a popular typo\n" ;
  48. print FILENAME":"NR":"$0 ;
  49. }
  50. }