Jim Meyering wrote: > Bruno Haible wrote: >> What should I write in the NEWS file, about recommendations for people who >> have >> patches on top of gnulib? > > We also need a way to keep things in order going forward. > I.e., a syntax-check style rule that enforces this style. > > To that end, please prepare a file like the one below, > to be committed along with your other changes, > or as part of a subsequent change that enforces policy. > I started based on your earlier outline. > > These are extended regular expressions that match > any file that must retain TAB-based indentation. > For now, let's not worry about TABs elsewhere. > -------------------------- > # These contain Makefile snippets. > ^modules/ > > # The regex module is the only major source code for which we still > # have bidirectional propagation between gnulib and glibc. > ^lib/regcomp\.c$ > ^lib/regex\.[ch]$ > ^lib/regex_internal\.[ch]$ > ^lib/regexec\.c$ > > # This is special. > ^lib/.*\.charset$ > > # This is a binary file. > ^lib/.*\.class$ > --------------------------
If you save the above in a file named .x-sc_prohibit_tab_based_indentation, the enforcement part may be as simple as this, from coreutils' cfg.mk: # Indent only with spaces. sc_prohibit_tab_based_indentation: @re='^ * ' \ msg='TAB in indentation; use only spaces' \ $(_prohibit_regexp)