From: schwarze Date: Tue, 6 Feb 2018 16:28:26 +0000 (+0000) Subject: Delete the "no blank before trailing delimiter" check from the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1abead14d37eef6057e0c7c656d48843c3ad207a;p=openbsd Delete the "no blank before trailing delimiter" check from the partial explicit macros. Leah Neukirchen rightfully points out that the check makes no sense for these macros. --- diff --git a/regress/usr.bin/mandoc/mdoc/Aq/empty.out_lint b/regress/usr.bin/mandoc/mdoc/Aq/empty.out_lint index d0d8401aade..c2824c15033 100644 --- a/regress/usr.bin/mandoc/mdoc/Aq/empty.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Aq/empty.out_lint @@ -1,2 +1 @@ mandoc: empty.in:12:14: STYLE: no blank before trailing delimiter: Aq user@host: -mandoc: empty.in:15:9: STYLE: no blank before trailing delimiter: Ao full: diff --git a/regress/usr.bin/mandoc/mdoc/Brq/empty.out_lint b/regress/usr.bin/mandoc/mdoc/Brq/empty.out_lint index a7092ae5729..434bcdb66f9 100644 --- a/regress/usr.bin/mandoc/mdoc/Brq/empty.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Brq/empty.out_lint @@ -1,2 +1 @@ mandoc: empty.in:12:19: STYLE: no blank before trailing delimiter: Brq user@host) -mandoc: empty.in:15:14: STYLE: no blank before trailing delimiter: Bro full) diff --git a/regress/usr.bin/mandoc/mdoc/Oo/Makefile b/regress/usr.bin/mandoc/mdoc/Oo/Makefile index f79a4d070fa..7a85c836c08 100644 --- a/regress/usr.bin/mandoc/mdoc/Oo/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Oo/Makefile @@ -1,6 +1,5 @@ -# $OpenBSD: Makefile,v 1.4 2017/06/10 01:48:31 schwarze Exp $ +# $OpenBSD: Makefile,v 1.5 2018/02/06 16:28:26 schwarze Exp $ REGRESS_TARGETS = punct -LINT_TARGETS = punct .include diff --git a/regress/usr.bin/mandoc/mdoc/Oo/punct.in b/regress/usr.bin/mandoc/mdoc/Oo/punct.in index 59fd328a8d9..7c84c75bd79 100644 --- a/regress/usr.bin/mandoc/mdoc/Oo/punct.in +++ b/regress/usr.bin/mandoc/mdoc/Oo/punct.in @@ -1,5 +1,5 @@ -.\" $OpenBSD: punct.in,v 1.4 2017/07/04 14:53:26 schwarze Exp $ -.Dd $Mdocdate: July 4 2017 $ +.\" $OpenBSD: punct.in,v 1.5 2018/02/06 16:28:26 schwarze Exp $ +.Dd $Mdocdate: February 6 2018 $ .Dt OO-PUNCT 1 .Os .Sh NAME @@ -22,7 +22,3 @@ at the end: .Oo Oo a ( .Oc | .Oc -.Pp -missing blank: -.Oo a. -.Oc diff --git a/regress/usr.bin/mandoc/mdoc/Oo/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/Oo/punct.out_ascii index 6c4fbfa33d2..91415a89be8 100644 --- a/regress/usr.bin/mandoc/mdoc/Oo/punct.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Oo/punct.out_ascii @@ -10,6 +10,4 @@ DDEESSCCRRIIPPTTIIOONN at the end: [[a (] |] - missing blank: [a.] - OpenBSD July 4, 2017 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Oo/punct.out_lint b/regress/usr.bin/mandoc/mdoc/Oo/punct.out_lint deleted file mode 100644 index 9f9beaaefa1..00000000000 --- a/regress/usr.bin/mandoc/mdoc/Oo/punct.out_lint +++ /dev/null @@ -1 +0,0 @@ -mandoc: punct.in:27:6: STYLE: no blank before trailing delimiter: Oo a. diff --git a/regress/usr.bin/mandoc/mdoc/Oo/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/Oo/punct.out_markdown index 5ad939656a0..8c530fa8085 100644 --- a/regress/usr.bin/mandoc/mdoc/Oo/punct.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Oo/punct.out_markdown @@ -20,7 +20,4 @@ at the end: \[\[a (] |] -missing blank: -\[a.] - OpenBSD - July 4, 2017 diff --git a/regress/usr.bin/mandoc/mdoc/Qq/empty.out_lint b/regress/usr.bin/mandoc/mdoc/Qq/empty.out_lint index 879cd127595..3789925cfdd 100644 --- a/regress/usr.bin/mandoc/mdoc/Qq/empty.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Qq/empty.out_lint @@ -1,2 +1 @@ mandoc: empty.in:12:18: STYLE: no blank before trailing delimiter: Qq user@host) -mandoc: empty.in:15:13: STYLE: no blank before trailing delimiter: Qo full) diff --git a/regress/usr.bin/mandoc/mdoc/Sq/empty.out_lint b/regress/usr.bin/mandoc/mdoc/Sq/empty.out_lint index 00d8e228d2b..1f1ccb4054e 100644 --- a/regress/usr.bin/mandoc/mdoc/Sq/empty.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Sq/empty.out_lint @@ -1,2 +1 @@ mandoc: empty.in:12:18: STYLE: no blank before trailing delimiter: Sq user@host) -mandoc: empty.in:15:13: STYLE: no blank before trailing delimiter: So full) diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 39bd00b0e83..63280daab97 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_validate.c,v 1.268 2017/09/12 18:20:32 schwarze Exp $ */ +/* $OpenBSD: mdoc_validate.c,v 1.269 2018/02/06 16:28:26 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2017 Ingo Schwarze @@ -167,12 +167,12 @@ static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] = { post_hyph, /* %T */ /* FIXME: can be used outside Rs/Re. */ NULL, /* %V */ NULL, /* Ac */ - post_delim_nb, /* Ao */ + NULL, /* Ao */ post_delim_nb, /* Aq */ post_at, /* At */ NULL, /* Bc */ post_bf, /* Bf */ - post_delim_nb, /* Bo */ + NULL, /* Bo */ NULL, /* Bq */ post_xx, /* Bsx */ post_bx, /* Bx */ @@ -192,16 +192,16 @@ static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] = { post_xx, /* Ox */ NULL, /* Pc */ NULL, /* Pf */ - post_delim_nb, /* Po */ + NULL, /* Po */ post_delim_nb, /* Pq */ NULL, /* Qc */ post_delim_nb, /* Ql */ - post_delim_nb, /* Qo */ + NULL, /* Qo */ post_delim_nb, /* Qq */ NULL, /* Re */ post_rs, /* Rs */ NULL, /* Sc */ - post_delim_nb, /* So */ + NULL, /* So */ post_delim_nb, /* Sq */ post_sm, /* Sm */ post_sx, /* Sx */ @@ -212,7 +212,7 @@ static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] = { NULL, /* Xo */ post_fo, /* Fo */ NULL, /* Fc */ - post_delim_nb, /* Oo */ + NULL, /* Oo */ NULL, /* Oc */ post_bk, /* Bk */ NULL, /* Ek */ @@ -225,7 +225,7 @@ static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] = { post_delim_nb, /* Lk */ post_defaults, /* Mt */ post_delim_nb, /* Brq */ - post_delim_nb, /* Bro */ + NULL, /* Bro */ NULL, /* Brc */ NULL, /* %C */ post_es, /* Es */ @@ -528,8 +528,7 @@ post_delim_nb(POST_ARGS) /* At least three alphabetic words with a sentence ending. */ if (strchr("!.:?", *lc) != NULL && (tok == MDOC_Em || - tok == MDOC_Li || tok == MDOC_Po || tok == MDOC_Pq || - tok == MDOC_Sy)) { + tok == MDOC_Li || tok == MDOC_Pq || tok == MDOC_Sy)) { nw = 0; for (cp = lc - 1; cp >= nch->string; cp--) { if (*cp == ' ') {