From: Michael Riesch <[email protected]>

clang-format 11 introduced the option "AllowShortEnumsOnASingleLine".
Set it to "false" in order to avoid short enums of the form:

    enum my_short_num { green, red };

With the option set to "false", they will be converted to

    enum my_short_num {
            green,
            red
    };

which is consistent with the definition of enums with more items.

Signed-off-by: Michael Riesch <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Signed-off-by: Michael Riesch <[email protected]>
Link: 
https://lore.pengutronix.de/[email protected]
Signed-off-by: Ahmad Fatoum <[email protected]>
---
 .clang-format | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.clang-format b/.clang-format
index be6c955e731c..1f310cfef5c6 100644
--- a/.clang-format
+++ b/.clang-format
@@ -19,6 +19,7 @@ AlignTrailingComments: false
 AllowAllParametersOfDeclarationOnNextLine: false
 AllowShortBlocksOnASingleLine: false
 AllowShortCaseLabelsOnASingleLine: false
+AllowShortEnumsOnASingleLine: false
 AllowShortFunctionsOnASingleLine: None
 AllowShortIfStatementsOnASingleLine: false
 AllowShortLoopsOnASingleLine: false
-- 
2.47.3


Reply via email to