From 7489ccc350ad61006603d9c7156ac801054d4f10 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 20 Aug 2020 12:11:26 +0100 Subject: [PATCH] coding style: document how to break a function declaration --- docs/CODING_STYLE.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/CODING_STYLE.md b/docs/CODING_STYLE.md index 119b9a2640..11cc6222e3 100644 --- a/docs/CODING_STYLE.md +++ b/docs/CODING_STYLE.md @@ -25,6 +25,17 @@ layout: default note that emacs loads `.dir-locals.el` automatically, but vim needs to be configured to load `.vimrc`, see that file for instructions. +- If you break a function declaration over multiple lines, do it like this: + + ```c + void some_function( + int foo, + bool bar, + char baz) { + + int a, b, c; + ``` + - Try to write this: ```c