diff options
Diffstat (limited to '.clang-format')
-rw-r--r-- | .clang-format | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..d0c759b --- /dev/null +++ b/.clang-format @@ -0,0 +1,40 @@ +--- +# .clang-format - How to format C files in sbc-harness +# +# Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com> +# SPDX-Licence-Identifier: AGPL-3.0-or-later + +Language: Cpp + +LineEnding: LF + +# Indentation +UseTab: ForContinuationAndIndentation +TabWidth: 8 +IndentWidth: 8 +ContinuationIndentWidth: 8 +ColumnLimit: 80 +IndentCaseLabels: false + +# Brace style +AllowShortIfStatementsOnASingleLine: false +BreakBeforeBraces: Attach + +# Alignment +AlignConsecutiveAssignments: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false +AlignConsecutiveDeclarations: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false + +# Preprocessor +SortIncludes: CaseSensitive +PPIndentWidth: -1 # inherit from IndentWidth +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: true + AcrossComments: false +AlignEscapedNewlines: Left |