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