blob: 686a068e12cb85304ccfb9b2b513fc82442e794e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
---
# .clang-format - How to format C files in sbc-harness
#
# Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com>
# SPDX-License-Identifier: AGPL-3.0-or-later
# https://releases.llvm.org/19.1.0/tools/clang/docs/ClangFormatStyleOptions.html
Language: Cpp # "C" didn't become a value until clang 20; I'm still on clang 19.1
BasedOnStyle: LLVM
LineEnding: LF
ColumnLimit: 0
# Indentation
UseTab: AlignWithSpaces
TabWidth: 8
IndentWidth: 8
ContinuationIndentWidth: 8
IndentCaseLabels: false
# Brace style
AllowShortCaseLabelsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
BreakBeforeBraces: Attach
Cpp11BracedListStyle: false
# Alignment
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
PadOperators: true
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
AlignFunctionPointers: true
AlignConsecutiveShortCaseStatements:
Enabled: true
# Preprocessor
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
AlignEscapedNewlines: Left
IndentPPDirectives: BeforeHash
PPIndentWidth: -1 # inherit from IndentWidth
SortIncludes: CaseSensitive
|