CodingStyle.md 1.24 KB
Newer Older
Sami Kerola's avatar
Sami Kerola committed
1 2 3
Most developers find Linux coding style easy to read, and there is
really no reason to reinvent this practise, so procps-ng goes along
with others.
albert's avatar
albert committed
4

5
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/CodingStyle
albert's avatar
albert committed
6

7
In addition to Linux coding style this project has few additional
Sami Kerola's avatar
Sami Kerola committed
8
wishes to contributors.
albert's avatar
albert committed
9

Sami Kerola's avatar
Sami Kerola committed
10 11 12 13
* Many small patches are favoured over one big. Break down is done on
  basis of logical functionality; for example #endif mark ups,
  compiler warning and exit codes fixes all should be individual
  small patches.
albert's avatar
albert committed
14

Sami Kerola's avatar
Sami Kerola committed
15 16 17
* Use 'FIXME: ' in code comments, manual pages, autotools files,
  scripts and so on to indicate something is wrong.  The reason we do
  is as simple as being able to find easily where problem areas are.
albert's avatar
albert committed
18

Sami Kerola's avatar
Sami Kerola committed
19 20 21
* In writing arithmetic comparisons, use "<" and "<=" rather than
  ">" and ">=".  For some justification, read this:
  http://thread.gmane.org/gmane.comp.version-control.git/3903/focus=4126
albert's avatar
albert committed
22

Sami Kerola's avatar
Sami Kerola committed
23 24 25 26 27
* Be nice to translators. Don't change translatable strings if you
  can avoid it.  If you must rearrange individual lines (e.g., in
  multi-line --help strings), extract and create new strings, rather
  than extracting and moving into existing blocks.  This avoids
  making unnecessary work for translators.