From 7ef7801be9abf52e08666d0b7fed24a7f642e7ac Mon Sep 17 00:00:00 2001 From: uint Date: Sat, 13 Dec 2025 14:30:41 +0000 Subject: remove silly if-else block rules to allow for more natural development --- docs/CONTRIBUTIONS.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/CONTRIBUTIONS.md b/docs/CONTRIBUTIONS.md index 9204fdf..aa1b05f 100644 --- a/docs/CONTRIBUTIONS.md +++ b/docs/CONTRIBUTIONS.md @@ -19,18 +19,24 @@ foo(dpy, root ### Blocks -* All blocks of C code must be wrapped in curly braces `{}`. +* All blocks of C code must be wrapped in curly braces `{}` unless it only goes down 1 line. +If it is also an if-else chain and there is at leas 1 block which has more than 1 line, all +blocks must use `{}`. * Each statement must be on its own line. * Always add a space between keywords and the opening parenthesis. **Example**: ```c -if (x) { +if (x) y(); + +if (y) { + z(); + a(); } else { - z(); + return; } ``` -- cgit v1.2.3