commit: 97a7f3521b37164ce33a6f1f7ea201308d74708b
parent 4c97b4db0a71564996b9eb176ec540fe6597e123
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 20 Aug 2021 23:59:52 +0200
Fix formatting, add linter
Diffstat:
9 files changed, 54 insertions(+), 23 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -0,0 +1 @@
+/mandoc_lint.log+
\ No newline at end of file
diff --git a/Makefile b/Makefile
@@ -3,9 +3,16 @@
PREFIX=/usr/local
MANDIR=${PREFIX}/share/man
+.PHONY: all
all:
:
+.PHONY: check
+check:
+ find ./man*/ -type f -exec man -c -Tlint {} \; | grep -v -f mandoc_lint_ignore | tee mandoc_lint.log
+ wc -l <mandoc_lint.log | grep -q '^0$$'
+
+.PHONY: install
install:
mkdir -p ${DESTDIR}${MANDIR}/
cp -r man[0-9]x ${DESTDIR}${MANDIR}/
diff --git a/man1x/date.1x b/man1x/date.1x
@@ -2,7 +2,7 @@
.\" Copyright © 2019-2020 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
.\" SPDX-License-Identifier: CC-BY-4.0
.Dd 2019-03-03
-.Dt date 1x
+.Dt DATE 1x
.Os
.Sh PROLOG
This manual page is part of
@@ -33,6 +33,7 @@ instead of current datetime (aka now). Absent for POSIX, present for
.Ox ,
GNU coreutils,
BusyBox.
+.El
.Ss +format
It is mostly similar to
.Xr strftime 3
@@ -57,7 +58,7 @@ to
The heck they managed to put in their manpage, followed by
.Xr strftime 3
format with reusing option formatting.
-.Bl -tag
+.Bl -tag -width 6n
.It POSIX
.Sm off
.Ar mmddhhmm
@@ -70,7 +71,7 @@ which makes it
.Sm off
.Ar %m%d%H%M
.Oo
-.Ar %C
+.Ar \&%C
.Op Ar %y
.Oc
.Sm on
@@ -87,7 +88,7 @@ which makes it
which makes it
.Sm off
.Oo Oo Oo Oo Oo
-.Ar %C Oc
+.Ar \&%C Oc
.Ar %y Oc
.Ar %m Oc
.Ar %d Oc
@@ -107,7 +108,7 @@ which makes it
.Sm off
.Ar %m%d%H%M
.Oo
-.Ar %C
+.Ar \&%C
.Op Ar %y
.Oc
.Op Ar .%S
@@ -115,12 +116,12 @@ which makes it
.It BusyBox
Recognized formats:
.Sm off
-.Bl -compact
+.Bl -item -compact
.It
.Ar hh:mm
.Op Ar :ss
.It
-.Op Ar YYYY.
+.Op Ar YYYY\&.
.Ar MM.DD-hh:mm
.Op Ar :ss
.It
@@ -150,7 +151,7 @@ which makes it
.Ar %m%d%H%M
.Op Ar %y
.Sm on
-.It At 10th , Bx 4.2
+.It At v10 , Bx 4.2
.Sm off
.Ar yymmddhhmm
.Op Ar .ss
@@ -160,6 +161,7 @@ which makes it
.Ar %y%m%d%H%M
.Op Ar .%S
.Sm on
+.El
.Sh SOURCE
.Nx 8.0 ,
.Fx 12.0 ,
@@ -167,7 +169,7 @@ which makes it
GNU coreutils 8.30,
BusyBox 1.30.1,
.At v6 ,
-.At 10th ,
+.At v10 ,
.Bx 4.2
.Sh AUTHORS
.An Haelwenn (lanodan) Monnier Aq Mt contact+c-u-d@hacktivis.me
diff --git a/man1x/install.1x b/man1x/install.1x
@@ -40,7 +40,8 @@ if
.Ar destination
already exists it is removed or renamed if
.Fl b
-is specified before source is copied. If destination is a directory then source is copied into destination with its original filename.
+is specified before source is copied.
+If destination is a directory then source is copied into destination with its original filename.
The mode of
.Ar destination
is set to 755 unless
@@ -48,7 +49,8 @@ is set to 755 unless
is specified.
.Bl -tag -width Ds
.It Fl b
-backup any existing files before overwriting them by renaming them. (GNU appends '~' by default,
+backup any existing files before overwriting them by renaming them.
+(GNU appends '~' by default,
BSDs
appends .old by default)
.It Fl c
@@ -56,7 +58,8 @@ Copy the file.
.Bx 4.2
default behaviour is to move the binary unless
.Fl c
-is specified. Copying the file is now the default behaviour; the flag is maintained for backwards compatibility only.
+is specified.
+Copying the file is now the default behaviour; the flag is maintained for backwards compatibility only.
.It Fl D
BusyBox, GNU coreutils,
.Ox :
diff --git a/man1x/seq.1x b/man1x/seq.1x
@@ -53,14 +53,15 @@ to separate numbers, it can contain character escape sequences in backslash nota
The default is \en.
.It Fl w
equalize width by zero-padding
+.El
.Sh HISTORY
From
.Nx
-manpage: The
+manpage: The
.Nm
command first appeared in
.At v8 .
-A
+A
.Nm
command appeared in
.Nx 3.0 .
diff --git a/man1x/su.1x b/man1x/su.1x
@@ -30,13 +30,16 @@ By default the environment is unmodified with the exception of
and
.Ev USER .
.Ev HOME and
-.Ev SHELL are set to the target user’s default values.
+.Ev SHELL
+are set to the target user’s default values.
.Ev LOGNAME
and
.Ev USER
are set to the target user, unless the target user has a UID of 0 and
.Fl l
-was not specified, in which case it is unmodified. The invoked shell is the target user’s. This is the traditional behaviour of su.
+was not specified, in which case it is unmodified.
+The invoked shell is the target user’s.
+This is the traditional behaviour of su.
If not using
.Fl m
and the target login has a UID of 0 then the
@@ -54,7 +57,8 @@ Simulate a full login, this discards the origin user’s environment, expect for
.It Fl c Ar command
Executes
.Ar command
-as the target user. This flag is used for "login class" in
+as the target user.
+This flag is used for "login class" in
.Nx ,
.Fx and
.Ox ,
@@ -68,7 +72,8 @@ and
.It Fl s Ar shell
Login to target user with
.Ar shell
-instead of their default one. This is absent in
+instead of their default one.
+This is absent in
.Nx
and in
.Fx
@@ -76,17 +81,19 @@ is used to specify that the “MAC label” must be set and takes no argument.
.It Op shell arguments
Executes the remaining
.Op shell arguments
-in the target user's shell non-interactively. This seems to be absent in Busybox.
+in the target user's shell non-interactively.
+This seems to be absent in Busybox.
+.El
.Sh SOURCE
GNU coreutils 8.30, Busybox 1.30.1,
.Ox 6.4 ,
.Nx 8.0 ,
.Fx 12.0
.Sh SEE ALSO
-.Xr sudo 1 ,
.Xr doas 1 ,
.Xr login 1 ,
-.Xr environ 7 .
+.Xr sudo 1 ,
+.Xr environ 7
.Sh HISTORY
A
.Nm
diff --git a/man1x/true.1x b/man1x/true.1x
@@ -28,7 +28,8 @@ doesn't ignore
.Fl -help
and
.Fl -version
-which could lead to bugs or unexpected behaviour. Such as:
+which could lead to bugs or unexpected behaviour.
+Such as:
.Bd -literal
$ /bin/true --help > /dev/full
/bin/true: write error: No space left on device
diff --git a/man5x/lrc.5x b/man5x/lrc.5x
@@ -55,7 +55,7 @@ An enhancement also allows to enclose timestamps in the middle of lines into ang
[00:12.00]Naku Penda Piya-Naku Taka Piya-Mpenziwe
[00:15.30]Some more lyrics ...
-...
+\&...
.Ed
.Sh SEE ALSO
.Lk https://en.wikipedia.org/wiki/LRC_(file_format)
diff --git a/mandoc_lint_ignore b/mandoc_lint_ignore
@@ -0,0 +1,8 @@
+STYLE: legacy man(7) date format:
+STYLE: referenced manual not found:
+WARNING: unknown manual section: Dt ... 1x
+WARNING: unknown manual section: Dt ... 5x
+WARNING: first section is not "NAME": Sh PROLOG
+WARNING: unknown AT&T UNIX version: At v8
+WARNING: unknown AT&T UNIX version: At v9
+WARNING: unknown AT&T UNIX version: At v10