xref: /nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/doc/contrib.txt (revision 104654410c56c573564690304ae786df310c91fc)
1*10465441SEvalZero1 Introduction
2*10465441SEvalZero
3*10465441SEvalZeroThis document describes some guidelines for people participating
4*10465441SEvalZeroin lwIP development.
5*10465441SEvalZero
6*10465441SEvalZero2 How to contribute to lwIP
7*10465441SEvalZero
8*10465441SEvalZeroHere is a short list of suggestions to anybody working with lwIP and
9*10465441SEvalZerotrying to contribute bug reports, fixes, enhancements, platform ports etc.
10*10465441SEvalZeroFirst of all as you may already know lwIP is a volunteer project so feedback
11*10465441SEvalZeroto fixes or questions might often come late. Hopefully the bug and patch tracking
12*10465441SEvalZerofeatures of Savannah help us not lose users' input.
13*10465441SEvalZero
14*10465441SEvalZero2.1 Source code style:
15*10465441SEvalZero
16*10465441SEvalZero1. do not use tabs.
17*10465441SEvalZero2. indentation is two spaces per level (i.e. per tab).
18*10465441SEvalZero3. end debug messages with a trailing newline (\n).
19*10465441SEvalZero4. one space between keyword and opening bracket.
20*10465441SEvalZero5. no space between function and opening bracket.
21*10465441SEvalZero6. one space and no newline before opening curly braces of a block.
22*10465441SEvalZero7. closing curly brace on a single line.
23*10465441SEvalZero8. spaces surrounding assignment and comparisons.
24*10465441SEvalZero9. don't initialize static and/or global variables to zero, the compiler takes care of that.
25*10465441SEvalZero10. use current source code style as further reference.
26*10465441SEvalZero
27*10465441SEvalZero2.2 Source code documentation style:
28*10465441SEvalZero
29*10465441SEvalZero1. JavaDoc compliant and Doxygen compatible.
30*10465441SEvalZero2. Function documentation above functions in .c files, not .h files.
31*10465441SEvalZero   (This forces you to synchronize documentation and implementation.)
32*10465441SEvalZero3. Use current documentation style as further reference.
33*10465441SEvalZero
34*10465441SEvalZero2.3 Bug reports and patches:
35*10465441SEvalZero
36*10465441SEvalZero1. Make sure you are reporting bugs or send patches against the latest
37*10465441SEvalZero   sources. (From the latest release and/or the current Git sources.)
38*10465441SEvalZero2. If you think you found a bug make sure it's not already filed in the
39*10465441SEvalZero   bugtracker at Savannah.
40*10465441SEvalZero3. If you have a fix put the patch on Savannah. If it is a patch that affects
41*10465441SEvalZero   both core and arch specific stuff please separate them so that the core can
42*10465441SEvalZero   be applied separately while leaving the other patch 'open'. The preferred way
43*10465441SEvalZero   is to NOT touch archs you can't test and let maintainers take care of them.
44*10465441SEvalZero   This is a good way to see if they are used at all - the same goes for unix
45*10465441SEvalZero   netifs except tapif.
46*10465441SEvalZero4. Do not file a bug and post a fix to it to the patch area. Either a bug report
47*10465441SEvalZero   or a patch will be enough.
48*10465441SEvalZero   If you correct an existing bug then attach the patch to the bug rather than creating a new entry in the patch area.
49*10465441SEvalZero5. Patches should be specific to a single change or to related changes. Do not mix bugfixes with spelling and other
50*10465441SEvalZero   trivial fixes unless the bugfix is trivial too. Do not reorganize code and rename identifiers in the same patch you
51*10465441SEvalZero   change behaviour if not necessary. A patch is easier to read and understand if it's to the point and short than
52*10465441SEvalZero   if it's not to the point and long :) so the chances for it to be applied are greater.
53*10465441SEvalZero
54*10465441SEvalZero2.4 Platform porters:
55*10465441SEvalZero
56*10465441SEvalZero1. If you have ported lwIP to a platform (an OS, a uC/processor or a combination of these) and
57*10465441SEvalZero   you think it could benefit others[1] you might want discuss this on the mailing list. You
58*10465441SEvalZero   can also ask for Git access to submit and maintain your port in the contrib Git module.
59