Обсуждение: Re: [COMMITTERS] pgsql: Remove tabs in SGML.

Поиск
Список
Период
Сортировка

Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
Bruce Momjian
Дата:
Alvaro Herrera wrote:
> Bruce Momjian wrote:
> > Peter Eisentraut wrote:
> > > On tis, 2010-01-26 at 10:20 -0800, David Fetter wrote:
> > > > On Tue, Jan 26, 2010 at 02:21:29PM +0000, Bruce Momjian wrote:
> > > > > Log Message:
> > > > > -----------
> > > > > Remove tabs in SGML.
> > > > 
> > > > Can we see about making a commit hook for CVS that disallows \t in
> > > > SGML files?  The process in git is pretty simple.
> > > 
> > > Better write a check in the makefile.
> > 
> > Done, and attached.  The rule is more shell script than makefile, but I
> > am not sure how else to do it.
> 
> Maybe have the check-tabs rule as a dependency of the "check", "html"
> and/or "draft" rules?
> 
> > + check-tabs:
> > +     ( ! grep '    ' $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) ) || (echo "Tabs appear in SGML files";
exit1)
 

Uh, I didn't think people wanted to actually have any tab testing in
their automatically.  Do they?

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
Alvaro Herrera
Дата:
Bruce Momjian wrote:
> Alvaro Herrera wrote:

> > Maybe have the check-tabs rule as a dependency of the "check", "html"
> > and/or "draft" rules?
> > 
> > > + check-tabs:
> > > +     ( ! grep '    ' $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) ) || (echo "Tabs appear in SGML files";
exit1)
 
> 
> Uh, I didn't think people wanted to actually have any tab testing in
> their automatically.  Do they?

IMO that's the point of the whole exercise.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
Bruce Momjian
Дата:
Alvaro Herrera wrote:
> Bruce Momjian wrote:
> > Alvaro Herrera wrote:
>
> > > Maybe have the check-tabs rule as a dependency of the "check", "html"
> > > and/or "draft" rules?
> > >
> > > > + check-tabs:
> > > > +     ( ! grep '    ' $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) ) || (echo "Tabs appear in SGML files";
exit 1) 
> >
> > Uh, I didn't think people wanted to actually have any tab testing in
> > their automatically.  Do they?
>
> IMO that's the point of the whole exercise.

OK, done with attached patch, now done as part of 'gmake check'.  If
people want it as part of the build process, please let me know.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: Makefile
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/Makefile,v
retrieving revision 1.136
diff -c -c -r1.136 Makefile
*** Makefile    5 Feb 2010 14:51:50 -0000    1.136
--- Makefile    5 Feb 2010 19:28:14 -0000
***************
*** 263,269 ****
  ##

  # Quick syntax check without style processing
! check: postgres.sgml $(ALMOSTALLSGML)
      $(NSGMLS) $(SPFLAGS) $(SGMLINCLUDE) -s $<


--- 263,269 ----
  ##

  # Quick syntax check without style processing
! check: postgres.sgml $(ALMOSTALLSGML) check-tabs
      $(NSGMLS) $(SPFLAGS) $(SGMLINCLUDE) -s $<


***************
*** 346,352 ****
  endif # sqlmansectnum != 7

  check-tabs:
!     ( ! grep '    ' $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) ) || (echo "Tabs appear in SGML files";  exit
1)

  ##
  ## Clean
--- 346,352 ----
  endif # sqlmansectnum != 7

  check-tabs:
!     @( ! grep '    ' $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) ) || (echo "Tabs appear in SGML files";  exit
1)

  ##
  ## Clean