tcpdump mailing list archives

Re: Has anyone got a clang-format for the tcpdump style?


From: Bill Fenner via tcpdump-workers <tcpdump-workers () lists tcpdump org>
Date: Sat, 7 Jan 2023 13:24:36 -0500

--- Begin Message --- From: Bill Fenner <fenner () gmail com>
Date: Sat, 7 Jan 2023 13:24:36 -0500
On Sat, Jan 7, 2023 at 12:38 PM Denis Ovsienko <denis () ovsienko info> wrote:

On Wed, 4 Jan 2023 08:40:21 -0500
Bill Fenner via tcpdump-workers <tcpdump-workers () lists tcpdump org>
wrote:

Hi,

I know the tcpdump style follows a bunch of bsd patterns, since it
came from Berkeley in the first place.  Does anyone have a
clang-format config that reflects these coding conventions?  One of
the problems I have in upstreaming Arista-developed tcpdump code is
making sure that the code fits in well with its surroundings, and
using clang-format for that purpose would sure be easier.

Bill, do you know if it would be practicable to apply code style per
file instead of doing a flag day on entire repository?

Also it might help before enforcing the style to get tcpdump 5.0 ready
(to remove backporting into 4.99 from the problem space) and to
merge/close as many pull requests as possible.


Many people use incremental formatting: when you change or add some code,
use the autoformatter to make sure that it conforms to the appropriate
style. One such script is “clang-format-diff.py”. This is the approach that
I want to take on the diffs that I would like to create pull requests for:
make sure that the diff itself conforms to the style.

  Bill

--- End Message ---
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers

Current thread: