]> cygwin.com Git - cygwin-apps/setup.git/blob - GUIDELINES
2003-10-23 Jerry D. Hedden <jerry@hedden.us>
[cygwin-apps/setup.git] / GUIDELINES
1 This file documents the guidelines to be followed when submitting patches to setup.exe.
2
3 Firstly, patch submission:
4
5 As per cygwin1.dll:
6 no changelog in the patch itself.
7 attach the changelog to the email.
8 new files are ok in the patch, or as attachments.
9 ChangeLog as per GNU standards.
10 One goal per patch. (*)
11 Multiple patches per email accepted, but my preference is for one patch
12 per email.
13
14 Secondly, Coding standards:
15 setup has a number of different code formats in it. This is ok as long
16 as it stays readable. I'll accept patches (if anyone wants to do it :})
17 to standardise towards what I'm laying out here. But: thats not needed!
18 Mainly, as code is changed, either leave well enough alone, or refactor
19 what you are working on accordingly.
20
21 The GNU standards are acceptable, but:
22 They don't explicitly cover C++, and C++ has a number of challenges that
23 are not met by them.
24 If you choose not to follow the GNU standards, then you should follow
25 these:
26 * classes or structs to be FirstLetterCapitalised.
27 * static members and globals to be FirstLetterCapitalised.
28 * local variables and non-static members to be
29 capitalisedAfterTheFirstWord.
30 * hungarian notation is banned.
31 * Try to keep functions less than 15 lines in length.
32 * Try to avoid using return values with non-query methods.
33 * Use classes rather than static functions.
34 * Place all methods for a single class in a single file. (* Libraries
35 may need multiple files, this is for setup.exe's source itself)
36 * Name the source file for classes and their headers after the class.
37 Capitalise it identically. Where pragmatism requires, try to be as close
38 as possible (see for instance, String++.h).
This page took 0.035143 seconds and 5 git commands to generate.