lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Question regarding commit "Test / RFC: Reformat a few f


From: Dirk Ziegelmeier
Subject: Re: [lwip-devel] Question regarding commit "Test / RFC: Reformat a few files using clang-format"
Date: Tue, 24 Jul 2018 08:23:33 +0200


Hi Dirk,
Here is my humble opinion:

1. The lwIP coding style is documented in doc/contrib.txt
   2.1 Source code style
   2.2 Source code documentation style

   If the code follow the source code style in 2.1/2.2, it should be fine.
   However, the clang-format commit seems add some more extra rules to
the coding style.
   e.g. the number of characters per line, the while space changes, etc.
   I think if you want to apply more rules, you need to update the 2.1
section first.

2. If lwIP want to enforce the consistent coding style, I think you
need a tool to check
   the patch and source code file.
   I used to work on linux kernel driver, and I found the
scripts/checkpatch.pl tool is
   very uselful. I know the maintainer won't accept patch if
checkpatch.pl complains.
   So even I might just read the coding style document for 1 or 2
times, I can easily
   prepare a patch with good coding style by just checking if
checkpatch.pl complains.
   Maybe such coding style checking tool is required by lwIP.
Too complicated, because of lack of manpower :-(​ And it may scare off developers. I don't think the Linux development model can be applied to this project. We are glad if we get any patch at all, I'd not want to complicate this any more.
 
3. I do care about conflicts, so I would suggest improving the coding
style gradually.
   i.e.
   - Ensure new patches with good coding style.
   - Ensure new files with good coding style.
   - But don't enforce coding style for all source code with big-diff.
     (Also note if there is a mistake in .clang-format, you will have
another big-diff to update the code which is not good).
     One topic per patch. You might find maybe some of the code just
leave it as is if you are half-half about the changes.

​I'll remove the clang-format again, lets go without autoformatting for now.

Dirk​






reply via email to

[Prev in Thread] Current Thread [Next in Thread]