diff options
author | ng0 <ng0@n0.is> | 2019-03-04 14:12:43 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-03-04 14:12:43 +0000 |
commit | 0387ab1e0673c9f1f96a8c52a6c128052b52022c (patch) | |
tree | e5f565bf4a34b5811cac1e5a122b131fa37fb038 | |
parent | 77b135454da98206cc216b81d1afe57f57a6e1da (diff) | |
download | gnunet-0387ab1e0673c9f1f96a8c52a6c128052b52022c.tar.gz gnunet-0387ab1e0673c9f1f96a8c52a6c128052b52022c.zip |
Add rule to lint man
-rw-r--r-- | Makefile.am | 4 | ||||
-rwxr-xr-x | contrib/scripts/lint-man.sh | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 41d366b93..a5e36545a 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -38,3 +38,7 @@ check-bashism: | |||
38 | check-python: | 38 | check-python: |
39 | printf "Running flake8 and 2to3 if detected.\n" | 39 | printf "Running flake8 and 2to3 if detected.\n" |
40 | $(top_srcdir)/contrib/scripts/lint-python.sh | 40 | $(top_srcdir)/contrib/scripts/lint-python.sh |
41 | |||
42 | check-man: | ||
43 | printf "Running lint-man.sh in doc/man.\n" | ||
44 | @cd $(top_srcdir)/doc/man ; $(top_srcdir)/../../contrib/scripts/lint-man.sh || true | ||
diff --git a/contrib/scripts/lint-man.sh b/contrib/scripts/lint-man.sh new file mode 100755 index 000000000..6a9f544f4 --- /dev/null +++ b/contrib/scripts/lint-man.sh | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # SPDX-License-Identifier: 0BSD | ||
4 | # spit out ONLY error messages using groff. | ||
5 | |||
6 | echo "groff check" | ||
7 | for f in `find . -name \*\.[1-9]`; | ||
8 | do | ||
9 | LC_ALL=en_US.UTF-8 \ | ||
10 | MANROFFSEQ='' \ | ||
11 | MANWIDTH=80 \ | ||
12 | groff -m mandoc -b -z -w w $f; | ||
13 | done | ||
14 | echo "mandoc check" | ||
15 | # spit out ONLY error messages with mandoc: | ||
16 | mandoc -T lint `find . -name \*\.[1-9]` | ||
17 | #LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 /run/current-system/profile/bin/man --warnings -E UTF-8 -l -Tutf8 -Z <*.5> >report5.log | ||
18 | #LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 /run/current-system/profile/bin/man --warnings -E UTF-8 -l -Tutf8 -Z <*.1> >report1.log | ||