Skip to content

Commit

Permalink
Added clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
madelen-at-work committed Aug 19, 2024
1 parent d98d1ac commit 39de532
Show file tree
Hide file tree
Showing 26 changed files with 2,834 additions and 2,935 deletions.
28 changes: 28 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
# Most of the settings are inherited by LLVM default
BasedOnStyle: LLVM
# Cpp covers both C and C++.
Language: Cpp
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: Consecutive
AlignConsecutiveMacros: Consecutive
AlignEscapedNewlines: Left
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortIfStatementsOnASingleLine: Never
AllowShortFunctionsOnASingleLine: Inline
AllowShortLoopsOnASingleLine: true
AlwaysBreakBeforeMultilineStrings: true
BinPackArguments: false
BinPackParameters: false
ColumnLimit: 100
IndentCaseLabels: true
# Most files have used this indentation width and to not get to large diffs
# at the first adaption to clang the width is kept at 4 instead of the LLVM and
# Google default of 2.
IndentWidth: 4
PointerAlignment: Left
KeepEmptyLinesAtTheStartOfBlocks: false
SpacesBeforeTrailingComments: 2
Standard: Auto
...
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
LINTER_RULES_PATH: /
IGNORE_GITIGNORED_FILES: true
VALIDATE_BASH: true
VALIDATE_CLANG_FORMAT: true
VALIDATE_DOCKERFILE_HADOLINT: true
VALIDATE_MARKDOWN: true
VALIDATE_SHELL_SHFMT: true
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"C_Cpp.clang_format_style": "file",
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint",
"editor.formatOnSave": true,
Expand Down
Loading

0 comments on commit 39de532

Please sign in to comment.