Add mdoc style checker

Add a new make 'mancheck' target which uses mandoc -Tlint to verify
manpage files: currently only zfs(8), zpool(8) zdb(8) and zgenhostid(8)
are supported.

Additionally fix some outstanding manpage formatting issues.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #6646
This commit is contained in:
LOLi
2017-09-16 19:51:24 +02:00
committed by Brian Behlendorf
parent 1f4e2c88fd
commit 90cdf2833d
4 changed files with 31 additions and 26 deletions
+8 -1
View File
@@ -39,7 +39,7 @@ dist-hook:
sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \
$(distdir)/META
checkstyle: cstyle shellcheck flake8 commitcheck
checkstyle: cstyle shellcheck flake8 commitcheck mancheck
commitcheck:
@if git rev-parse --git-dir > /dev/null 2>&1; then \
@@ -58,6 +58,13 @@ shellcheck:
$$(find cmd/zpool/zpool.d/* -executable); \
fi
mancheck:
@if type mandoc > /dev/null 2>&1; then \
for file in zfs zpool zdb zgenhostid; do \
mandoc -Tlint -Werror ${top_srcdir}/man/man8/$$file.8; \
done \
fi
lint: cppcheck paxcheck
cppcheck: