diff options
| author | uint <abhinav.prsai@gmail.com> | 2025-12-13 14:30:41 +0000 |
|---|---|---|
| committer | uint <abhinav.prsai@gmail.com> | 2025-12-13 14:30:41 +0000 |
| commit | 7ef7801be9abf52e08666d0b7fed24a7f642e7ac (patch) | |
| tree | f045af3eb92d8747dc3dd74065db32475513af18 /docs/CONTRIBUTIONS.md | |
| parent | daa6a0c13268d8307ef2cf2b6c00e44d5f8048ee (diff) | |
remove silly if-else block rules to allow for more natural development
Diffstat (limited to 'docs/CONTRIBUTIONS.md')
| -rw-r--r-- | docs/CONTRIBUTIONS.md | 12 |
1 files changed, 9 insertions, 3 deletions
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; } ``` |
