Changes between Version 4 and Version 5 of DeveloperDocumentationNew


Ignore:
Timestamp:
02/07/17 10:46:39 (7 years ago)
Author:
Samuli Seppänen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperDocumentationNew

    v4 v5  
    2626= Patch quality =
    2727
    28 == Formatting ==
    29 
    30 Existing codebase uses the following formatting conventions:
     28== Code style ==
     29
     30OpenVPN 2.3 and earlier use mostly the following conventions:
    3131
    3232 * Indentation is 2 spaces (no tabs)
     
    3737   * indent-with-tabs nil
    3838
    39 == Conventions ==
    40 
    41 All ''patches'', regardless of their type need to be created following a few rules:
    42 
    43  * Must be sent as unified diff (diff -u) or preferably generated by ''git format-patch''
    44  * Patches must have a short but descriptive one-line summary of the change, followed by a more descriptive text explaining in plain English why and how the patch is written.  This description should ''not'' be too technical, as the patch itself will reveal technical details.  More on [http://who-t.blogspot.com/2009/12/on-commit-messages.html writing good commit messages here]
    45  * Patches should contain a 'Signed-off-by:' line at the end (git commit --signoff).  If missing, it will be added with the sender of the patch as the signed-off person.
     39OpenVPN 2.4 uses the Allman style:
     40
     41 * Indentation is 4 spaces, no tabs ever.
     42 * Opening and closing brackets get their own line, and must match indentation.
     43 * Line length is 80 characters.
     44 * C99 is allowed. E.g. for (int i = 0; i < max; i++).
     45 * Only use /* */-style comments
     46
     47Full documentation of the 2.4 style is on the [wiki:CodeStyle CodeStyle] page.
     48
     49== Commit message ==
     50
     51Patches must have a short but descriptive one-line summary of the change, followed by a more descriptive text explaining in plain English why and how the patch is written.  This description should ''not'' be too technical, as the patch itself will reveal the technical details. The patch should also conform to these rules (adapted from [http://chris.beams.io/posts/git-commit/#seven-rules here]):
     52
     53 * Separate subject from body with a blank line
     54 * Limit the subject line to 50 characters
     55  * '''NOTE:''' this limit is under discussion
     56 * Capitalize the subject line
     57 * Do not end the subject line with a period
     58 * Use the imperative mood in the subject line
     59 * Wrap the body at 72 characters
     60  * '''NOTE:''' this limit is under discussion
     61 * Use the body to explain "what" and "why"
     62
     63In addition
     64
     65 * Patches should contain a 'Signed-off-by:' line at the end (git commit --signoff).
    4666 * Patches must apply cleanly, without merge conflicts.  Please state which code base the patch is written against.  If based on the git tree, please state which branch it is to be applied to.
    47  * Everyone who has contributed to this patch should be mentioned out of courtesy and respect to all contributors and helpers on the way.   If suitable valid e-mail address should be used, preferably in addition with full name.
     67 * Everyone who has contributed to this patch should be mentioned out of courtesy and respect to all contributors and helpers on the way. If suitable valid e-mail address should be used, preferably in addition with full name.
     68
     69== Sending the patch ==
     70
     71We strongly encourage using [https://git-scm.com/docs/git-send-email git send-email] for sending the patches, so that your email client does not mess up the patch.
     72
    4873
    4974== Code contributions ==