summaryrefslogtreecommitdiffstats
path: root/mantools/manlint
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:18:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:18:56 +0000
commitb7c15c31519dc44c1f691e0466badd556ffe9423 (patch)
treef944572f288bab482a615e09af627d9a2b6727d8 /mantools/manlint
parentInitial commit. (diff)
downloadpostfix-b7c15c31519dc44c1f691e0466badd556ffe9423.tar.xz
postfix-b7c15c31519dc44c1f691e0466badd556ffe9423.zip
Adding upstream version 3.7.10.upstream/3.7.10
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mantools/manlint')
-rwxr-xr-xmantools/manlint165
1 files changed, 165 insertions, 0 deletions
diff --git a/mantools/manlint b/mantools/manlint
new file mode 100755
index 0000000..8927d89
--- /dev/null
+++ b/mantools/manlint
@@ -0,0 +1,165 @@
+#!/bin/sh
+
+# manlint - lint manual page 'roff source, stop list in mantools/manlint.stop
+
+# example: mantools/manlint man/man?/*
+
+grep -n . "$@" | sed -n '
+ s/$/ /
+ # Non-bold manual page references
+ /[a-z][_a-z0-9_]*([0-9])/{
+ p
+ d
+ }
+ # Command examples not enclosed in quotes
+ /[^"]\\fB[a-z][_a-z0-9-]* /{
+ p
+ d
+ }
+ # Missing manual page sections
+ /\\fBanvil\\fR[^-(]/{
+ p
+ d
+ }
+ /\\fBbounce\\fR[^-(]/{
+ p
+ d
+ }
+ /\\fBcleanup\\fR[^-(]/{
+ p
+ d
+ }
+ /\\fBdiscard\\fR[^-(]/{
+ p
+ d
+ }
+ /\\fBerror\\fR[^-(]/{
+ p
+ d
+ }
+ /\\fBflush\\fR[^-(]/{
+ p
+ d
+ }
+ /\\fBlmtp\\fR[^-(]/{
+ p
+ d
+ }
+ /\\fBlocal\\fR[^-(]/{
+ p
+ d
+ }
+ /\\fBmaster\\fR[^-(]/{
+ p
+ d
+ }
+ /\\fBoqmgr\\fR[^-(]/{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