From dd281e19a7c9b5c25618f98f95b6d767e4e436c5 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sat, 22 Nov 2025 22:50:39 +0100 Subject: [PATCH] docs: Document cast formatting rules --- docs/CODING_STYLE.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/CODING_STYLE.md b/docs/CODING_STYLE.md index 18fefb48466..a890bd25ecd 100644 --- a/docs/CODING_STYLE.md +++ b/docs/CODING_STYLE.md @@ -67,6 +67,18 @@ SPDX-License-Identifier: LGPL-2.1-or-later const char *foo(const char *input); ``` +- Casts should be written like this: + + ```c + (const char*) s; + ``` + + instead of this: + + ```c + (const char *)s; + ``` + - Single-line `if` blocks should not be enclosed in `{}`. Write this: ```c -- 2.47.3