From: Thomas Haller <thaller@redhat.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: [nft PATCH] clang-format: add clang-format configuration file from Linux kernel
Date: Thu, 24 Aug 2023 09:43:42 +0200 [thread overview]
Message-ID: <1b819d702e02acc20b5119e3f26ca4d3aad0b4f2.camel@redhat.com> (raw)
In-Reply-To: <ZOcBRE869V3ViqDh@calendula>
On Thu, 2023-08-24 at 09:05 +0200, Pablo Neira Ayuso wrote:
> Hi Thomas,
>
> On Wed, Aug 23, 2023 at 09:11:31AM +0200, Thomas Haller wrote:
> > Clang-format is useful for developing, even if the code base does
> > not
> > enforce an automated style. With this, I can select a function in
> > the
> > editor, and reformat that portion with clang-format. In particular,
> > it
> > can fix indentation and tabs.
> >
> > The style of nftables is close to kernel style, so take the file
> > from
> > Linux v6.4 ([1]). There are no changes, except (manually) adjusting
> > "ForEachMacros".
>
> I'd prefer you keep this locally by now.
>
> If more developers are relying on this feature, we can revisit later.
>
Hi Pablo,
OK.
If anybody is interested, I solved this on my end, by having nftables
checked out in a subdirectory like
nftables
├── .clang-format
└── nftables
├── aclocal.m4
├── ...
And for the record, these were the patches that introduced the file to
kernel and the documentation in kernel:
- [PATCH] clang-format: add configuration file
https://lore.kernel.org/lkml/20180312233952.niz2cuz7psv4fe2s@gmail.com/
- [PATCH v2] clang-format: add configuration file
https://lore.kernel.org/lkml/20180318171632.qfkemw3mwbcukth6@gmail.com/
- Linux Documentation/process
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/clang-format.rst?id=v6.4
Thanks,
Thomas
prev parent reply other threads:[~2023-08-24 7:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 7:11 [nft PATCH] clang-format: add clang-format configuration file from Linux kernel Thomas Haller
2023-08-24 7:05 ` Pablo Neira Ayuso
2023-08-24 7:43 ` Thomas Haller [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=1b819d702e02acc20b5119e3f26ca4d3aad0b4f2.camel@redhat.com \
--to=thaller@redhat.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/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).