diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-12-04 02:53:46 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-12-04 02:53:46 +0000 |
commit | 0ce81fa984870a181f12460f7f6a6a5637fc5d87 (patch) | |
tree | c02cbc475be98e57c56a721ce4917e0f81a414f4 /regress/usr.bin/mandoc | |
parent | bc9ad67d8a3f34b3f956c2f5f238080e71c721bf (diff) |
Clean up the validation of .Pp, .PP, .sp, and .br. Make sure all
combinations are handled, and are handled in a systematic manner.
This resolves some erratic duplicate handling, handles a number of
missing cases, and improves diagnostics in various respects.
Move validation of .br and .sp to the roff validation module
rather than doing that twice in the mdoc and man validation modules.
Move the node relinking function to the roff library where it belongs.
In validation functions, only look at the node itself, at previous
nodes, and at descendants, not at following nodes or ancestors,
such that only nodes are inspected which are already validated.
Diffstat (limited to 'regress/usr.bin/mandoc')
-rw-r--r-- | regress/usr.bin/mandoc/man/PP/empty.out_lint | 1 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/man/blank/afterSH.out_lint | 2 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/man/blank/afterSS.out_lint | 2 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/man/blank/line.out_lint | 9 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Sh/parborder.out_lint | 2 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/blank/line.out_lint | 4 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/args/roff.out_lint | 1 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/cond/if.out_lint | 2 |
8 files changed, 19 insertions, 4 deletions
diff --git a/regress/usr.bin/mandoc/man/PP/empty.out_lint b/regress/usr.bin/mandoc/man/PP/empty.out_lint index 4c62912fadd..2a8516ac5b3 100644 --- a/regress/usr.bin/mandoc/man/PP/empty.out_lint +++ b/regress/usr.bin/mandoc/man/PP/empty.out_lint @@ -1,3 +1,4 @@ mandoc: empty.in:8:2: WARNING: skipping paragraph macro: PP empty mandoc: empty.in:11:2: WARNING: skipping paragraph macro: PP empty mandoc: empty.in:14:2: WARNING: skipping paragraph macro: PP empty +mandoc: empty.in:6:2: WARNING: skipping paragraph macro: PP after SH diff --git a/regress/usr.bin/mandoc/man/blank/afterSH.out_lint b/regress/usr.bin/mandoc/man/blank/afterSH.out_lint index 4f641b3c433..233661d6a30 100644 --- a/regress/usr.bin/mandoc/man/blank/afterSH.out_lint +++ b/regress/usr.bin/mandoc/man/blank/afterSH.out_lint @@ -1,4 +1,6 @@ +mandoc: afterSH.in:10:2: WARNING: skipping paragraph macro: PP after SH mandoc: afterSH.in:32:2: WARNING: skipping paragraph macro: br after SH mandoc: afterSH.in:36:2: WARNING: skipping paragraph macro: sp after SH +mandoc: afterSH.in:45:2: WARNING: skipping paragraph macro: PP after SH mandoc: afterSH.in:72:2: WARNING: skipping paragraph macro: br after SH mandoc: afterSH.in:77:2: WARNING: skipping paragraph macro: sp after SH diff --git a/regress/usr.bin/mandoc/man/blank/afterSS.out_lint b/regress/usr.bin/mandoc/man/blank/afterSS.out_lint index e5f5bc47476..0204890c220 100644 --- a/regress/usr.bin/mandoc/man/blank/afterSS.out_lint +++ b/regress/usr.bin/mandoc/man/blank/afterSS.out_lint @@ -1,4 +1,6 @@ +mandoc: afterSS.in:11:2: WARNING: skipping paragraph macro: PP after SS mandoc: afterSS.in:33:2: WARNING: skipping paragraph macro: br after SS mandoc: afterSS.in:37:2: WARNING: skipping paragraph macro: sp after SS +mandoc: afterSS.in:46:2: WARNING: skipping paragraph macro: PP after SS mandoc: afterSS.in:73:2: WARNING: skipping paragraph macro: br after SS mandoc: afterSS.in:78:2: WARNING: skipping paragraph macro: sp after SS diff --git a/regress/usr.bin/mandoc/man/blank/line.out_lint b/regress/usr.bin/mandoc/man/blank/line.out_lint index 30de6f49f9c..28a6898ab24 100644 --- a/regress/usr.bin/mandoc/man/blank/line.out_lint +++ b/regress/usr.bin/mandoc/man/blank/line.out_lint @@ -1,8 +1,13 @@ -mandoc: line.in:6:2: WARNING: skipping paragraph macro: sp after SH +mandoc: line.in:18:2: WARNING: skipping paragraph macro: br after br mandoc: line.in:24:2: WARNING: skipping paragraph macro: br after PP mandoc: line.in:26:2: WARNING: skipping paragraph macro: PP empty +mandoc: line.in:29:2: WARNING: skipping paragraph macro: br before sp +mandoc: line.in:33:2: WARNING: skipping paragraph macro: br after sp mandoc: line.in:36:2: WARNING: skipping paragraph macro: sp after PP mandoc: line.in:39:2: WARNING: skipping paragraph macro: sp after PP +mandoc: line.in:47:2: WARNING: skipping paragraph macro: br before sp +mandoc: line.in:51:2: WARNING: skipping paragraph macro: br after sp mandoc: line.in:54:1: WARNING: skipping paragraph macro: sp after PP -mandoc: line.in:82:2: WARNING: skipping paragraph macro: sp after SH +mandoc: line.in:6:2: WARNING: skipping paragraph macro: sp after SH mandoc: line.in:85:2: WARNING: skipping paragraph macro: sp after SS +mandoc: line.in:82:2: WARNING: skipping paragraph macro: sp after SH diff --git a/regress/usr.bin/mandoc/mdoc/Sh/parborder.out_lint b/regress/usr.bin/mandoc/mdoc/Sh/parborder.out_lint index 0da9e5dfad2..03863fbabcb 100644 --- a/regress/usr.bin/mandoc/mdoc/Sh/parborder.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Sh/parborder.out_lint @@ -1,7 +1,7 @@ mandoc: parborder.in:9:2: WARNING: skipping paragraph macro: Pp after Sh mandoc: parborder.in:11:2: WARNING: skipping paragraph macro: Pp at the end of Sh -mandoc: parborder.in:13:2: WARNING: skipping paragraph macro: Pp after Sh mandoc: parborder.in:17:2: WARNING: skipping paragraph macro: Pp after Ss mandoc: parborder.in:19:2: WARNING: skipping paragraph macro: Pp at the end of Ss mandoc: parborder.in:15:2: WARNING: skipping paragraph macro: Pp before Ss mandoc: parborder.in:22:2: WARNING: skipping paragraph macro: Pp at the end of Ss +mandoc: parborder.in:13:2: WARNING: skipping paragraph macro: Pp after Sh diff --git a/regress/usr.bin/mandoc/mdoc/blank/line.out_lint b/regress/usr.bin/mandoc/mdoc/blank/line.out_lint index 990bb5bd3ad..e122298d739 100644 --- a/regress/usr.bin/mandoc/mdoc/blank/line.out_lint +++ b/regress/usr.bin/mandoc/mdoc/blank/line.out_lint @@ -11,13 +11,15 @@ mandoc: line.in:19:2: WARNING: skipping paragraph macro: br after br mandoc: line.in:21:2: WARNING: skipping paragraph macro: br before Pp mandoc: line.in:25:2: WARNING: skipping paragraph macro: br after Pp mandoc: line.in:27:2: WARNING: skipping paragraph macro: Pp before Pp +mandoc: line.in:30:2: WARNING: skipping paragraph macro: br before sp mandoc: line.in:34:2: WARNING: skipping paragraph macro: br after sp mandoc: line.in:37:2: WARNING: skipping paragraph macro: sp after Pp mandoc: line.in:40:2: WARNING: skipping paragraph macro: sp after Pp +mandoc: line.in:48:2: WARNING: skipping paragraph macro: br before sp mandoc: line.in:52:2: WARNING: skipping paragraph macro: br after sp mandoc: line.in:55:1: WARNING: skipping paragraph macro: sp after Pp mandoc: line.in:82:2: WARNING: skipping paragraph macro: sp after Sh mandoc: line.in:84:2: WARNING: skipping paragraph macro: Pp at the end of Sh -mandoc: line.in:86:2: WARNING: skipping paragraph macro: Pp after Sh mandoc: line.in:89:2: WARNING: skipping paragraph macro: Pp after Ss mandoc: line.in:91:2: WARNING: skipping paragraph macro: Pp at the end of Ss +mandoc: line.in:86:2: WARNING: skipping paragraph macro: Pp after Sh diff --git a/regress/usr.bin/mandoc/roff/args/roff.out_lint b/regress/usr.bin/mandoc/roff/args/roff.out_lint index 5ac03917282..c5f4b3d3284 100644 --- a/regress/usr.bin/mandoc/roff/args/roff.out_lint +++ b/regress/usr.bin/mandoc/roff/args/roff.out_lint @@ -14,3 +14,4 @@ mandoc: roff.in:69:7: STYLE: unterminated quoted argument mandoc: roff.in:69:13: STYLE: whitespace at end of input line mandoc: roff.in:70:11: STYLE: unterminated quoted argument mandoc: roff.in:70:17: STYLE: whitespace at end of input line +mandoc: roff.in:72:2: WARNING: skipping paragraph macro: br at the end of SH diff --git a/regress/usr.bin/mandoc/roff/cond/if.out_lint b/regress/usr.bin/mandoc/roff/cond/if.out_lint index 5fb37795c81..597140d86c5 100644 --- a/regress/usr.bin/mandoc/roff/cond/if.out_lint +++ b/regress/usr.bin/mandoc/roff/cond/if.out_lint @@ -1,2 +1,4 @@ mandoc: if.in:15:2: WARNING: conditional request controls empty scope: if mandoc: if.in:17:2: WARNING: conditional request controls empty scope: if +mandoc: if.in:42:2: WARNING: skipping paragraph macro: br before sp +mandoc: if.in:71:2: WARNING: skipping paragraph macro: br after br |