Re: [nft PATCH] clang-format: add clang-format configuration file from Linux kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx/

 - [PATCH v2] clang-format: add configuration file
   https://lore.kernel.org/lkml/20180318171632.qfkemw3mwbcukth6@xxxxxxxxx/

 - 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





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux