gbranden pushed a commit to branch master
in repository groff.
commit cea99e8cc13ccc320f8c66fca0eda0568f43239e
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Nov 14 18:54:19 2020 +1100
tmac/an-old.tmac (TH): Style-warn if > 5 args.
.TH being given too many arguments (due to a failure of quoting) is a
more likely problem scenario than too few, and it's easy to check for.
Also ChangeLog this and the previous CHECKSTYLE change.
---
ChangeLog | 21 ++++++++++++++++++---
tmac/an-old.tmac | 2 +-
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index cc785ee..d8c84e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,25 @@
+2020-11-14 G. Branden Robinson <[email protected]>
+
+ Add style checks to man(7) macro package.
+
+ Not otherwise documented yet; experimental--subject to change.
+
+ * tmac/an-old.tmac: Initialize CHECKSTYLE to false if not
+ already set.
+ (an-style-warn): New macro emits diagnostic of type "style" when
+ called if CHECKSTYLE register is true.
+ (TH): Call an-style-warn if fewer than two or more than five
+ arguments are seen.
+ (RI, IR, IB, BI, RB, BR): Call an-style-warn if fewer than two
+ arguments are seen.
+
2020-11-11 Bertrand Garrigues <[email protected]>
Update copyright
- * update-copyright.sh: use gnulib's 'update-copyright' script. Pass
- this script in directories 'arch', 'contrib', 'font', 'man', 'tmac',
- 'src' and on a list of extra files.
+ * update-copyright.sh: use gnulib's 'update-copyright' script.
+ Pass this script in directories 'arch', 'contrib', 'font',
+ 'man', 'tmac', 'src' and on a list of extra files.
* FOR-RELEASE: mention this point.
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index 8fecafe..b7781ec 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -115,7 +115,7 @@
.
.\" .TH title section extra1 extra2 extra3
.de1 TH
-. if (\\n[.$] < 2) \
+. if ((\\n[.$] < 2) : (\\n[.$] > 5)) \
. an-style-warn .\\$0 expects 2 to 5 arguments, got \\n[.$]
. if \\n[an-html] \{\
. DEVTAG-TL
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit