pgsql: Remove more SGML tabs.

Started by Bruce Momjianalmost 15 years ago13 messages
#1Bruce Momjian
bruce@momjian.us

Remove more SGML tabs.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/70802e0dbef0af4bf73ce25489b8be6e40eca2be

Modified Files
--------------
doc/src/sgml/recovery-config.sgml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

#2David Fetter
david@fetter.org
In reply to: Bruce Momjian (#1)
Re: [COMMITTERS] pgsql: Remove more SGML tabs.

On Wed, Feb 09, 2011 at 01:17:06PM +0000, Bruce Momjian wrote:

Remove more SGML tabs.

Perhaps we should see about putting something in .git/hooks/pre-commit
so people can focus on more substantive matters.

Is there some kind of cross-platform way to do this? I'm thinking
that given the fact that our build system already requires Perl, there
should be, but I'm not quite sure how this would be accomplished.

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

#3Magnus Hagander
magnus@hagander.net
In reply to: David Fetter (#2)
Re: [COMMITTERS] pgsql: Remove more SGML tabs.

On Feb 9, 2011 5:01 PM, "David Fetter" <david@fetter.org> wrote:

On Wed, Feb 09, 2011 at 01:17:06PM +0000, Bruce Momjian wrote:

Remove more SGML tabs.

Perhaps we should see about putting something in .git/hooks/pre-commit
so people can focus on more substantive matters.

Is there some kind of cross-platform way to do this? I'm thinking
that given the fact that our build system already requires Perl, there
should be, but I'm not quite sure how this would be accomplished.

If you can write a reliable perl script for this, we can run it like
pgindent. No need to complicate it with hooks.

/Magnus

#4Peter Eisentraut
peter_e@gmx.net
In reply to: David Fetter (#2)
Re: [COMMITTERS] pgsql: Remove more SGML tabs.

On ons, 2011-02-09 at 08:00 -0800, David Fetter wrote:

On Wed, Feb 09, 2011 at 01:17:06PM +0000, Bruce Momjian wrote:

Remove more SGML tabs.

Perhaps we should see about putting something in .git/hooks/pre-commit
so people can focus on more substantive matters.

Is there some kind of cross-platform way to do this? I'm thinking
that given the fact that our build system already requires Perl, there
should be, but I'm not quite sure how this would be accomplished.

There is make check target in doc/src/sgml/ that is supposed to catch
this. But it's probably hard to remember to run that.

One thing I was thinking of was that we could add a global make
maintainer-check target (a name I picked up from other projects) which
would run various source code sanity checks. Besides the SGML tabs
issue, my favourite would be duplicate_oids. Maybe if we could find a
third use case, we'd have a quorum for implementing this.

#5Alvaro Herrera
alvherre@commandprompt.com
In reply to: Peter Eisentraut (#4)
Re: [COMMITTERS] pgsql: Remove more SGML tabs.

Excerpts from Peter Eisentraut's message of jue feb 10 07:58:16 -0300 2011:

One thing I was thinking of was that we could add a global make
maintainer-check target (a name I picked up from other projects) which
would run various source code sanity checks. Besides the SGML tabs
issue, my favourite would be duplicate_oids. Maybe if we could find a
third use case, we'd have a quorum for implementing this.

The c++ headers thing? Or the compiles-in-isolation test for headers?

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

#6David Fetter
david@fetter.org
In reply to: Peter Eisentraut (#4)
Re: [COMMITTERS] pgsql: Remove more SGML tabs.

On Thu, Feb 10, 2011 at 12:58:16PM +0200, Peter Eisentraut wrote:

On ons, 2011-02-09 at 08:00 -0800, David Fetter wrote:

On Wed, Feb 09, 2011 at 01:17:06PM +0000, Bruce Momjian wrote:

Remove more SGML tabs.

Perhaps we should see about putting something in .git/hooks/pre-commit
so people can focus on more substantive matters.

Is there some kind of cross-platform way to do this? I'm thinking
that given the fact that our build system already requires Perl, there
should be, but I'm not quite sure how this would be accomplished.

There is make check target in doc/src/sgml/ that is supposed to catch
this. But it's probably hard to remember to run that.

It's "check-tabs", and if you hadn't mentioned it, I'd never have seen it.

One thing I was thinking of was that we could add a global make
maintainer-check target (a name I picked up from other projects) which
would run various source code sanity checks. Besides the SGML tabs
issue, my favourite would be duplicate_oids. Maybe if we could find a
third use case, we'd have a quorum for implementing this.

I think all such checks belong in .git/hooks/pre-commit, and need to
be as cross-platform as needed for committers. Would a *n*x-based
version do for a start?

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

#7Peter Eisentraut
peter_e@gmx.net
In reply to: David Fetter (#6)
Re: [COMMITTERS] pgsql: Remove more SGML tabs.

On tor, 2011-02-10 at 10:40 -0800, David Fetter wrote:

I think all such checks belong in .git/hooks/pre-commit, and need to
be as cross-platform as needed for committers. Would a *n*x-based
version do for a start?

I think as a matter of principle, the only things that belongs into git
hooks are things that relate to the repository itself, such as commit
metadata (author checks, commit message spell checks, etc.). Anything
that relates to the source belongs into the source.

#8David Fetter
david@fetter.org
In reply to: Peter Eisentraut (#7)
Re: [COMMITTERS] pgsql: Remove more SGML tabs.

On Thu, Feb 10, 2011 at 09:16:09PM +0200, Peter Eisentraut wrote:

On tor, 2011-02-10 at 10:40 -0800, David Fetter wrote:

I think all such checks belong in .git/hooks/pre-commit, and need
to be as cross-platform as needed for committers. Would a
*n*x-based version do for a start?

I think as a matter of principle, the only things that belongs into
git hooks are things that relate to the repository itself, such as
commit metadata (author checks, commit message spell checks, etc.).
Anything that relates to the source belongs into the source.

So on that principle, should "make check" do these checks?

Just to put another viewpoint out there, the reason that such hooks
exist is precisely to enable people to do deeper checks than commit
metadata.

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

#9David Fetter
david@fetter.org
In reply to: Alvaro Herrera (#5)
Re: [COMMITTERS] pgsql: Remove more SGML tabs.

On Thu, Feb 10, 2011 at 11:29:43AM -0300, Alvaro Herrera wrote:

Excerpts from Peter Eisentraut's message of jue feb 10 07:58:16 -0300 2011:

One thing I was thinking of was that we could add a global make
maintainer-check target (a name I picked up from other projects)
which would run various source code sanity checks. Besides the
SGML tabs issue, my favourite would be duplicate_oids. Maybe if
we could find a third use case, we'd have a quorum for
implementing this.

The c++ headers thing? Or the compiles-in-isolation test for
headers?

Both sound reasonable, given the number of times they come up and the
ease of checking them mechanically.

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

#10Peter Eisentraut
peter_e@gmx.net
In reply to: Peter Eisentraut (#4)
1 attachment(s)
Re: [COMMITTERS] pgsql: Remove more SGML tabs.

On tor, 2011-02-10 at 12:58 +0200, Peter Eisentraut wrote:

There is make check target in doc/src/sgml/ that is supposed to catch
this. But it's probably hard to remember to run that.

One thing I was thinking of was that we could add a global make
maintainer-check target (a name I picked up from other projects) which
would run various source code sanity checks. Besides the SGML tabs
issue, my favourite would be duplicate_oids. Maybe if we could find a
third use case, we'd have a quorum for implementing this.

Hah, I found one. There's already a hidden maintainer-check target that
checks the NLS files syntax.

Anyway, here is a small patch that changes the duplicate_oids script to
return a nonzero exit status in case of a problem, and then creates a
global maintainer-check target that checks that and the SGML syntax and
the NLS thing. Other things could be added in the future.
Documentation should be added.

Useful?

Attachments:

maintainer-check.patchtext/x-patch; charset=UTF-8; name=maintainer-check.patchDownload
diff --git a/GNUmakefile.in b/GNUmakefile.in
index b9c5f31..f3c5fe5 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -65,6 +65,8 @@ $(call recurse,check-world,src/test src/pl src/interfaces/ecpg,check)
 
 $(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib,installcheck)
 
+$(call recurse,maintainer-check,doc src config contrib)
+
 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
 	./config.status $@
 
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile
index add2c28..3041a53 100644
--- a/doc/src/sgml/Makefile
+++ b/doc/src/sgml/Makefile
@@ -279,7 +279,7 @@ MAKEINFO = makeinfo
 ##
 
 # Quick syntax check without style processing
-check: postgres.sgml $(ALMOSTALLSGML) check-tabs
+check maintainer-check: postgres.sgml $(ALMOSTALLSGML) check-tabs
 	$(NSGMLS) $(SPFLAGS) $(SGMLINCLUDE) -s $<
 
 
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 2eff4d4..69512ac 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -18,9 +18,9 @@
 #
 # Meta configuration
 
-standard_targets = all install installdirs uninstall distprep clean distclean maintainer-clean coverage check installcheck
+standard_targets = all install installdirs uninstall distprep clean distclean maintainer-clean coverage check installcheck maintainer-check
 
-.PHONY: $(standard_targets) install-strip maintainer-check html man installcheck-parallel
+.PHONY: $(standard_targets) install-strip html man installcheck-parallel
 
 # make `all' the default target
 all:
diff --git a/src/include/Makefile b/src/include/Makefile
index 0d5f049..1bfb4a7 100644
--- a/src/include/Makefile
+++ b/src/include/Makefile
@@ -67,3 +67,6 @@ clean:
 
 distclean maintainer-clean: clean
 	rm -f pg_config.h dynloader.h pg_config_os.h stamp-h
+
+maintainer-check:
+	cd catalog && ./duplicate_oids
diff --git a/src/include/catalog/duplicate_oids b/src/include/catalog/duplicate_oids
index 3f3d9f6..82c12f3 100755
--- a/src/include/catalog/duplicate_oids
+++ b/src/include/catalog/duplicate_oids
@@ -22,6 +22,9 @@ sed -n	-e 's/^DATA(insert *OID *= *\([0-9][0-9]*\).*$/\1/p' \
 	-e 's/^DECLARE_TOAST([^,]*, *\([0-9][0-9]*\), *\([0-9][0-9]*\).*$/\1,\2/p' | \
 tr ',' '\n' | \
 sort -n | \
-uniq -d
+uniq -d | \
+grep '.'
 
-exit 0
+# nonzero exit code if lines were produced
+[ $? -eq 1 ]
+exit
#11Robert Haas
robertmhaas@gmail.com
In reply to: Peter Eisentraut (#10)
Re: [COMMITTERS] pgsql: Remove more SGML tabs.

On Thu, Mar 24, 2011 at 4:05 PM, Peter Eisentraut <peter_e@gmx.net> wrote:

On tor, 2011-02-10 at 12:58 +0200, Peter Eisentraut wrote:

There is make check target in doc/src/sgml/ that is supposed to catch
this.  But it's probably hard to remember to run that.

One thing I was thinking of was that we could add a global make
maintainer-check target (a name I picked up from other projects) which
would run various source code sanity checks.  Besides the SGML tabs
issue, my favourite would be duplicate_oids.  Maybe if we could find a
third use case, we'd have a quorum for implementing this.

Hah, I found one.  There's already a hidden maintainer-check target that
checks the NLS files syntax.

Anyway, here is a small patch that changes the duplicate_oids script to
return a nonzero exit status in case of a problem, and then creates a
global maintainer-check target that checks that and the SGML syntax and
the NLS thing.  Other things could be added in the future.
Documentation should be added.

Useful?

+1 from me.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

#12Peter Eisentraut
peter_e@gmx.net
In reply to: Peter Eisentraut (#10)
Re: [COMMITTERS] pgsql: Remove more SGML tabs.

On tor, 2011-03-24 at 16:05 -0400, Peter Eisentraut wrote:

Anyway, here is a small patch that changes the duplicate_oids script
to return a nonzero exit status in case of a problem, and then creates
a global maintainer-check target that checks that and the SGML syntax
and the NLS thing. Other things could be added in the future.
Documentation should be added.

Committed, but didn't find a good place to document it.

#13David Fetter
david@fetter.org
In reply to: Peter Eisentraut (#12)
Re: [COMMITTERS] pgsql: Remove more SGML tabs.

On Mon, Mar 28, 2011 at 10:56:39PM +0300, Peter Eisentraut wrote:

On tor, 2011-03-24 at 16:05 -0400, Peter Eisentraut wrote:

Anyway, here is a small patch that changes the duplicate_oids script
to return a nonzero exit status in case of a problem, and then creates
a global maintainer-check target that checks that and the SGML syntax
and the NLS thing. Other things could be added in the future.
Documentation should be added.

Committed, but didn't find a good place to document it.

Is there a section for any of the maintainer- stuff in make? If not,
should there be?

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate