git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: Elijah Newren <newren@gmail.com>,
	git@vger.kernel.org, avarab@gmail.com, jrnieder@gmail.com
Subject: Re: [PATCHv4 0/6] Add missing includes and forward declares
Date: Thu, 16 Aug 2018 13:48:11 -0400	[thread overview]
Message-ID: <20180816174810.GD882@sigill.intra.peff.net> (raw)
In-Reply-To: <b8553a50-6b97-2b45-2f7b-cfe2576548cb@ramsayjones.plus.com>

On Thu, Aug 16, 2018 at 01:19:17AM +0100, Ramsay Jones wrote:

> As a quick ("just before bedtime") exercise, I tried adding
> a Makefile target to perform a similar check. The result is
> given below, but I haven't had time to look too closely at
> the results:

The resulting patch doesn't look too horrible, and I think it would be
great to automate this, even if people don't always run it by default.

The flip side is the "do all files include git-compat-util.h first" test
I mentioned elsewhere (and which resulted in the test-tool.h patch).
That could be automated, too. I did it like:

  {
    echo '#undef int'
    cat git-compat-util.h
  } >tmp
  mv tmp git-compat-util.h
  make CFLAGS=-Dint=foo

That's obviously pretty nasty, but if we were willing to carry:

  #ifdef UNDO_TRICKY_LINT_HACK
  #undef int
  #endif

in git-compat-util.h, it could be driven from the Makefile. Maybe
worth-while to couple with this.

-Peff

      parent reply	other threads:[~2018-08-16 17:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <https://public-inbox.org/git/20180813171749.10481-1-newren@gmail.com/>
2018-08-15 17:54 ` [PATCHv4 0/6] Add missing includes and forward declares Elijah Newren
2018-08-15 17:54   ` [PATCHv4 1/6] Add missing includes and forward declarations Elijah Newren
2018-08-15 20:36     ` Jonathan Nieder
2018-08-15 17:54   ` [PATCHv4 2/6] alloc: make allocate_alloc_state and clear_alloc_state more consistent Elijah Newren
2018-08-15 20:37     ` Jonathan Nieder
2018-08-15 17:54   ` [PATCHv4 3/6] Move definition of enum branch_track from cache.h to branch.h Elijah Newren
2018-08-15 17:54   ` [PATCHv4 4/6] urlmatch.h: fix include guard Elijah Newren
2018-08-15 17:54   ` [PATCHv4 5/6] compat/precompose_utf8.h: use more common include guard style Elijah Newren
2018-08-15 17:54   ` [PATCHv4 6/6] Remove forward declaration of an enum Elijah Newren
2018-08-15 20:40     ` Jonathan Nieder
2018-08-15 20:41   ` [PATCHv4 0/6] Add missing includes and forward declares Jonathan Nieder
2018-08-16  0:19   ` Ramsay Jones
2018-08-16 16:20     ` Junio C Hamano
2018-08-16 17:48     ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180816174810.GD882@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=newren@gmail.com \
    --cc=ramsay@ramsayjones.plus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).