summaryrefslogtreecommitdiffstats
path: root/regress
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-04 02:53:51 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-04 02:53:51 +0000
commitd5e1ccb6de73cd87d11400b2f3d09826595bfc89 (patch)
tree16a922eb7f5a41bc2ef3f86d153377b0258a8cfa /regress
parentd504e7480ce979e924b1c4fe82bdbcaa790ca153 (diff)
downloadmandoc-d5e1ccb6de73cd87d11400b2f3d09826595bfc89.tar.gz
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')
-rw-r--r--regress/man/PP/empty.out_lint1
-rw-r--r--regress/man/blank/afterSH.out_lint2
-rw-r--r--regress/man/blank/afterSS.out_lint2
-rw-r--r--regress/man/blank/line.out_lint9
-rw-r--r--regress/mdoc/Sh/parborder.out_lint2
-rw-r--r--regress/mdoc/blank/line.out_lint4
-rw-r--r--regress/roff/args/roff.out_lint1
-rw-r--r--regress/roff/cond/if.out_lint2
8 files changed, 19 insertions, 4 deletions
diff --git a/regress/man/PP/empty.out_lint b/regress/man/PP/empty.out_lint
index 4c62912f..2a8516ac 100644
--- a/regress/man/PP/empty.out_lint
+++ b/regress/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/man/blank/afterSH.out_lint b/regress/man/blank/afterSH.out_lint
index 4f641b3c..233661d6 100644
--- a/regress/man/blank/afterSH.out_lint
+++ b/regress/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/man/blank/afterSS.out_lint b/regress/man/blank/afterSS.out_lint
index e5f5bc47..0204890c 100644
--- a/regress/man/blank/afterSS.out_lint
+++ b/regress/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/man/blank/line.out_lint b/regress/man/blank/line.out_lint
index 30de6f49..28a6898a 100644
--- a/regress/man/blank/line.out_lint
+++ b/regress/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/mdoc/Sh/parborder.out_lint b/regress/mdoc/Sh/parborder.out_lint
index 0da9e5df..03863fba 100644
--- a/regress/mdoc/Sh/parborder.out_lint
+++ b/regress/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/mdoc/blank/line.out_lint b/regress/mdoc/blank/line.out_lint
index 990bb5bd..e122298d 100644
--- a/regress/mdoc/blank/line.out_lint
+++ b/regress/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/roff/args/roff.out_lint b/regress/roff/args/roff.out_lint
index 5ac03917..c5f4b3d3 100644
--- a/regress/roff/args/roff.out_lint
+++ b/regress/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/roff/cond/if.out_lint b/regress/roff/cond/if.out_lint
index 5fb37795..597140d8 100644
--- a/regress/roff/cond/if.out_lint
+++ b/regress/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