Re: [tcpdump-workers] Has anyone got a clang-format for the tcpdump style?
--- Begin Message --- On Sat, Jan 7, 2023 at 12:38 PM Denis Ovsienko wrote: > On Wed, 4 Jan 2023 08:40:21 -0500 > Bill Fenner via tcpdump-workers > 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
Re: [tcpdump-workers] Has anyone got a clang-format for the tcpdump style?
--- Begin Message --- On Wed, 4 Jan 2023 08:40:21 -0500 Bill Fenner via tcpdump-workers 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. -- Denis Ovsienko --- End Message --- ___ tcpdump-workers mailing list tcpdump-workers@lists.tcpdump.org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
[tcpdump-workers] Has anyone got a clang-format for the tcpdump style?
--- Begin Message --- 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. Thanks, Bill --- End Message --- ___ tcpdump-workers mailing list tcpdump-workers@lists.tcpdump.org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers