diff --git a/.clang-format b/.clang-format index bd25c04..f7b0658 100644 --- a/.clang-format +++ b/.clang-format @@ -1,4 +1,7 @@ -# .clang-format +# .clang-format + +# Recommended clang-format version: 19 or higher. +# Please note that alignment settings may not be supported in versions below 19. # Base style to use BasedOnStyle: Google @@ -11,14 +14,29 @@ UseTab: Never Language: Cpp # Alignment settings -AlignConsecutiveDeclarations: true -AlignConsecutiveAssignments: true +AlignConsecutiveDeclarations: + Enabled: true + AcrossEmptyLines: true + AcrossComments: true + +AlignConsecutiveAssignments: + Enabled: true + AcrossEmptyLines: true + AcrossComments: true + +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: true + AcrossComments: true + +AlignTrailingComments: true # Break settings BreakBeforeBraces: Custom BraceWrapping: AfterFunction: true BeforeElse: true + AfterExternBlock: true AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: false @@ -37,7 +55,7 @@ SpaceBeforeParensOptions: AfterControlStatements: false # Other settings -ColumnLimit: 160 # Disable column limit +ColumnLimit: 120 # Put each one of the function paremeters on its own line. BinPackParameters: false diff --git a/app/xeve_app_args.h b/app/xeve_app_args.h index 6d404db..381ffb2 100644 --- a/app/xeve_app_args.h +++ b/app/xeve_app_args.h @@ -60,6 +60,8 @@ typedef struct _ARGS_OPT char desc[512]; /* description of option */ } ARGS_OPT; +// clang-format off + /* Define various command line options as a table */ static const ARGS_OPT args_opt_table[] = \ { @@ -630,6 +632,7 @@ static const ARGS_OPT args_opt_table[] = \ }, {ARGS_END_KEY, "", ARGS_VAL_TYPE_NONE, 0, NULL, ""} /* termination */ }; +// clang-format on typedef struct _ARGS_PARSER ARGS_PARSER; struct _ARGS_PARSER