Thread: Re: [COMMITTERS] pgsql: Remove more SGML tabs.

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

From
David Fetter
Date:
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


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

From
Magnus Hagander
Date:
<p><br /> On Feb 9, 2011 5:01 PM, "David Fetter" <<a href="mailto:david@fetter.org">david@fetter.org</a>>
wrote:<br/> ><br /> > On Wed, Feb 09, 2011 at 01:17:06PM +0000, Bruce Momjian wrote:<br /> > > Remove more
SGMLtabs.<br /> ><br /> > Perhaps we should see about putting something in .git/hooks/pre-commit<br /> > so
peoplecan focus on more substantive matters.<br /> ><br /> > Is there some kind of cross-platform way to do this?
 I'mthinking<br /> > that given the fact that our build system already requires Perl, there<br /> > should be,
butI'm not quite sure how this would be accomplished.<p>If you can write a reliable perl script for this, we can run it
likepgindent. No need to complicate it with hooks. <p>/Magnus  

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

From
Peter Eisentraut
Date:
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.




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

From
Alvaro Herrera
Date:
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


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

From
David Fetter
Date:
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


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

From
Peter Eisentraut
Date:
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.



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

From
David Fetter
Date:
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


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

From
David Fetter
Date:
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


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

From
Peter Eisentraut
Date:
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?


Attachment

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

From
Robert Haas
Date:
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


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

From
Peter Eisentraut
Date:
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.



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

From
David Fetter
Date:
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