Skip to content

Commit

Permalink
src: proposed coding style for C, Linux++
Browse files Browse the repository at this point in the history
The intention of this is to serve as a help/guidance for both devs and
reviewers of pull requests.

Baseline is taken from Linux v6.5.6, with some (possibly) controversial
additions (at the end of the file):

 - Do not enforce max line length
 - Alignment of variables, both when assigning and declaring
 - Use spaces to adjust when leading tabs are not enough (as Emacs)

I've also added a couple of exceptions for macros like TAILQ_FOREACH()
which are used as control statments (if, while, for), so the opening
brace should be on the same line -- otherwise clang-format thinkts we
are creating a recursive function ...

Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Nov 15, 2023
1 parent 0de25f9 commit 934857b
Showing 1 changed file with 701 additions and 0 deletions.
Loading

0 comments on commit 934857b

Please sign in to comment.