From f8f1c8111e78f24de8675b3bd074503330f62124 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 8 Jul 2011 17:10:17 +0200 Subject: [PATCH] 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. --- cfg.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cfg.mk b/cfg.mk index ce27cf6..d36f7c8 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:' \ -- 2.7.4