2
0

check-texinfo.awk.in 1.2 KB

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