Coding Rules

From ArmadeusWiki
Revision as of 09:48, 10 October 2012 by JulienB (Talk | contribs) (New page: This page defines the Coding Rules that apply to all the source code of the Armadeus Project BSP. ==C files== * Both userspace or driver code shall use the Linux kernel "coding style". De...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page defines the Coding Rules that apply to all the source code of the Armadeus Project BSP.

C files

  • Both userspace or driver code shall use the Linux kernel "coding style". Details are given here: buildroot/output/build/linux-x.x/Documentation/CodingStyle
  • If not sure, one can use the following script to automagically indent its source files: buildroot/output/build/linux-2.6.35.3/scripts/Lindent

C++ files

  • No rules defined yet.

Python files

  • No rules defined yet.

Makefiles

  • Makefiles syntax is already rigid enough to limit coder excentricity :-)
  • However: constants should be in Uppercase.

Bash scripts

  • Indentation: 1 TAB
  • Do not use more than 132 columns
  • Constants in Uppercase