All of lore.kernel.org
 help / color / mirror / Atom feed
From: Garrit Franke <garrit@slashdev.space>
To: avarab@gmail.com
Cc: garrit@slashdev.space, git@vger.kernel.org, gitster@pobox.com
Subject: [PATCH v2 0/4] various: use iwyu (include-what-you-use) to analyze includes
Date: Tue,  5 Apr 2022 13:45:02 +0200	[thread overview]
Message-ID: <20220405114505.24389-1-garrit@slashdev.space> (raw)
In-Reply-To: <20220331194436.58005-1-garrit@slashdev.space>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=ANSI_X3.4-1968, Size: 1764 bytes --]

I'm sorry about the half-baked patch of mine. I initially noticed that
the "hash-lookup.h" wasn't needed (which was a correct assumption), and
then went overboard when trying to clean up the other includes.

This is truly a rookie mistake that only wastes the time of everyone
involved. This won't happen again!

On 01.04.22 10:07, Ævar Arnfjörð Bjarmason wrote:

> ... For anyone interested in pursuing this, I think using the excellent
> include-what-you-use tool would be a nice start.
>
> We could even eventually add it to our CI if the false positive rate
> isn't bad (I haven't checked much):
> https://github.com/include-what-you-use/include-what-you-use

This seems to be a really nice tool indeed. I wouldn't be comfortable
adding it to the CI just yet, but it did make it considerably easier to
spot includes that could safely be removed.

I think we could try battle-testing this tool in the codebase to get a
sense of how it behaves. To start, I added your reference-command to a
script under "contrib/iwyu" and ran it against the files you noted.
Before breaking a bulk of the files, I wanted to make sure that this
undertaking is headed in the right direction.

Feedback is of course welcomed!

Garrit Franke (4):
  contrib: add iwyu script
  bisect.c: remove unnecessary include
  serve.c: remove unnecessary include
  apply.c: remove unnecessary include

 bisect.c             |  1 -
 builtin/apply.c      |  1 -
 contrib/iwyu/README  | 33 +++++++++++++++++++++++++++++++++
 contrib/iwyu/iwyu.sh |  2 ++
 serve.c              |  1 -
 5 files changed, 35 insertions(+), 3 deletions(-)
 create mode 100644 contrib/iwyu/README
 create mode 100755 contrib/iwyu/iwyu.sh

-- 
2.35.1


  parent reply	other threads:[~2022-04-05 12:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 19:44 [PATCH] bisect.c: remove unused includes Garrit Franke
2022-03-31 21:29 ` Junio C Hamano
2022-04-01  8:07   ` using iwyu (include-what-you-use) to analyze includes (was: [PATCH] bisect.c: remove unused includes) Ævar Arnfjörð Bjarmason
2022-04-05 11:45 ` Garrit Franke [this message]
2022-04-06  7:54   ` [PATCH v2 0/4] various: use iwyu (include-what-you-use) to analyze includes Ævar Arnfjörð Bjarmason
2022-04-05 11:45 ` [PATCH v2 1/4] contrib: add iwyu script Garrit Franke
2022-04-06  7:40   ` Ævar Arnfjörð Bjarmason
2022-04-05 11:45 ` [PATCH v2 2/4] bisect.c: remove unnecessary include Garrit Franke
2022-04-06  7:50   ` Ævar Arnfjörð Bjarmason
2022-04-06 16:41     ` Junio C Hamano
2022-04-05 11:45 ` [PATCH v2 3/4] serve.c: " Garrit Franke
2022-04-05 11:45 ` [PATCH v2 4/4] apply.c: " Garrit Franke

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=20220405114505.24389-1-garrit@slashdev.space \
    --to=garrit@slashdev.space \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.