summaryrefslogtreecommitdiff
path: root/cfg.mk
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-07-08 17:10:17 +0200
committerJim Meyering <meyering@redhat.com>2011-07-08 21:55:00 +0200
commitf8f1c8111e78f24de8675b3bd074503330f62124 (patch)
treec337b062860c830724438f59386dbad683d78707 /cfg.mk
parentaf1ffdff17f7d8d7fefb889fe77cb1cace2e9af8 (diff)
downloadcoreutils-f8f1c8111e78f24de8675b3bd074503330f62124.tar.xz
maint: add syntax-check rule to prohibit "."-terminated "SEE ALSO"
* cfg.mk (sc_prohibit_man_see_also_period): Prohibit a period at the end of the first line after a "SEE ALSO" marker in man/*.x. With this, we shouldn't have to make any more changes like those in today's commit, f2dabd68.
Diffstat (limited to 'cfg.mk')
-rw-r--r--cfg.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/cfg.mk b/cfg.mk
index ce27cf680..d36f7c88c 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -219,6 +219,14 @@ sc_prohibit_tab_based_indentation:
halt='TAB in indentation; use only spaces' \
$(_sc_search_regexp)
+# The SEE ALSO section of a man page should not be terminated with
+# a period. Check the first line after each "SEE ALSO" line in man/*.x:
+sc_prohibit_man_see_also_period:
+ @grep -nB1 '\.$$' $$($(VC_LIST_EXCEPT) | grep 'man/.*\.x$$') \
+ | grep -A1 -e '-\[SEE ALSO\]' | grep '\.$$' && \
+ { echo '$(ME): do not end "SEE ALSO" section with a period' \
+ 1>&2; exit 1; } || :
+
# Don't use "indent-tabs-mode: nil" anymore. No longer needed.
sc_prohibit_emacs__indent_tabs_mode__setting:
@prohibit='^( *[*#] *)?indent-tabs-mode:' \