From 9d36b9f59a3a9d2c5a22fba72014e792411c74c7 Mon Sep 17 00:00:00 2001 From: Stepan Usatiuk Date: Sat, 1 Mar 2025 20:18:21 +0100 Subject: [PATCH] add clang format --- Firmware/.clang-format | 76 ++++++++++++++++++++++++++++++++++++++++++ Firmware/.gitignore | 2 ++ 2 files changed, 78 insertions(+) create mode 100644 Firmware/.clang-format diff --git a/Firmware/.clang-format b/Firmware/.clang-format new file mode 100644 index 0000000..c700749 --- /dev/null +++ b/Firmware/.clang-format @@ -0,0 +1,76 @@ +# Generated from CLion C/C++ Code Style settings +--- +Language: Cpp +BasedOnStyle: LLVM +AccessModifierOffset: -4 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false +AlignConsecutiveBitFields: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false +AlignConsecutiveDeclarations: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false +AlignTrailingComments: + Kind: Always + OverEmptyLines: 2 +SpacesBeforeTrailingComments: 1 +AlignOperands: Align +AlignEscapedNewlines: Right +AlwaysBreakTemplateDeclarations: Yes +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: false + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true +BreakBeforeBraces: Custom +BreakConstructorInitializers: AfterColon +BreakConstructorInitializersBeforeComma: false +ColumnLimit: 120 +ConstructorInitializerAllOnOneLineOrOnePerLine: false +ContinuationIndentWidth: 8 +IncludeCategories: + - Regex: '^<.*' + Priority: 1 + - Regex: '^".*' + Priority: 2 + - Regex: '.*' + Priority: 3 +IncludeIsMainRegex: '([-_](test|unittest))?$' +IndentCaseLabels: true +IndentWidth: 4 +InsertNewlineAtEOF: true +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 2 +PointerAlignment: Left +SpaceAfterCStyleCast: true +SpaceAfterTemplateKeyword: false +SpaceBeforeRangeBasedForLoopColon: false +SpaceInEmptyParentheses: false +SpacesInAngles: false +SpacesInConditionalStatement: false +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +... diff --git a/Firmware/.gitignore b/Firmware/.gitignore index 378eac2..1c008f7 100644 --- a/Firmware/.gitignore +++ b/Firmware/.gitignore @@ -1 +1,3 @@ build +cmake-build* +.idea