ci: Changes from #160- Invoke the mandoc linter (#296)

* ci: Changes from #160- Invoke the mandoc linter

* Add check.sh from #160 too

* Fix mandoc
This commit is contained in:
Prabhpreet Dua
2024-05-05 02:17:11 +05:30
committed by GitHub
parent b45b7bc7f5
commit 761d5730af
2 changed files with 25 additions and 0 deletions

13
doc/check.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# We have to filter this STYLE error out, because it is very platform specific
OUTPUT=$(mandoc -Tlint "$1" | grep --invert-match "STYLE: referenced manual not found")
if [ -z "$OUTPUT" ]
then
exit 0
else
echo "$1 is malformatted, check mandoc -Tlint $1"
echo "$OUTPUT"
exit 1
fi