The Good Patch

(add wikipedia link)
 
(2 intermediate revisions not shown)
Line 1: Line 1:
-
== Characteristics of The Good Patch ==
+
== Characteristics of a good patch ==
-
A detailed and technical complement to the [[Maemo contribution guidelines]].
+
A good patch should:
 +
* be in [[:wikipedia:Diff#Unified_format|unified context format]] (<code>diff -u</code>)
 +
** alternatively, be generated with <pre>git format-patch</pre>
 +
* only include related changes
 +
* not introduce any compile time warnings
 +
* have test code (if any) separate from the added/changed functionality
 +
* not add any extra debug printing, unless absolutely necessary
 +
* match the coding style of the existing source file, for example with regard to indentation and whitespace
-
* The Good Patch should be in unified context format (diff -u).
+
When attaching a patch to a bug at https://bugs.maemo.org/, add the "patch" keyword to the bug report.
-
* The Good Patch should not include any unrelated changes.
+
 
-
* The Good Patch should not generate any more compile time warnings than were already there.
+
[[Category:Development]]
-
* The Good Patch should have test code (if any) separate from the added/changed functionality.
+
-
* The Good Patch should not add any extra debug printing unless absolutely necessary.
+
-
* The Good Patch should match the Coding Style of the existing source file, e.g. with regard to indentation and whitespaces etc.
+
-
* When attaching The Good Patch in bugs.maemo.org, add the "patch" keyword to the bug report.
+

Latest revision as of 13:16, 2 February 2011

[edit] Characteristics of a good patch

A good patch should:

  • be in unified context format (diff -u)
    • alternatively, be generated with
      git format-patch
  • only include related changes
  • not introduce any compile time warnings
  • have test code (if any) separate from the added/changed functionality
  • not add any extra debug printing, unless absolutely necessary
  • match the coding style of the existing source file, for example with regard to indentation and whitespace

When attaching a patch to a bug at https://bugs.maemo.org/, add the "patch" keyword to the bug report.