Skip to content

Commit c82f1d8

Browse files
committed
Fix formatting.
1 parent c2d9328 commit c82f1d8

File tree

4 files changed

+383
-350
lines changed

4 files changed

+383
-350
lines changed

.clang-format

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
# We'll use defaults from the LLVM style, but with 4 columns indentation.
3+
BasedOnStyle: LLVM
4+
IndentWidth: 2
5+
---
6+
Language: Cpp
7+
DeriveLineEnding: false
8+
UseCRLF: true
9+
DerivePointerAlignment: false
10+
PointerAlignment: Left
11+
AlignConsecutiveAssignments: true
12+
AllowShortFunctionsOnASingleLine: Inline
13+
AllowShortIfStatementsOnASingleLine: Never
14+
AllowShortLambdasOnASingleLine: Empty
15+
AlwaysBreakTemplateDeclarations: Yes
16+
AccessModifierOffset: -2
17+
AlignTrailingComments: true
18+
SpacesBeforeTrailingComments: 2
19+
NamespaceIndentation: Inner
20+
MaxEmptyLinesToKeep: 1
21+
BreakBeforeBraces: Custom
22+
BraceWrapping:
23+
AfterCaseLabel: false
24+
AfterClass: true
25+
AfterControlStatement: false
26+
AfterEnum: true
27+
AfterFunction: true
28+
AfterNamespace: true
29+
AfterStruct: true
30+
AfterUnion: true
31+
AfterExternBlock: true
32+
BeforeCatch: false
33+
BeforeElse: false
34+
BeforeLambdaBody: false
35+
BeforeWhile: false
36+
IndentBraces: false
37+
SplitEmptyFunction: false
38+
SplitEmptyRecord: false
39+
SplitEmptyNamespace: true
40+
ColumnLimit: 88
41+
ForEachMacros: ['Q_FOREACH', 'foreach']

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ repos:
66
- id: end-of-file-fixer
77
- id: check-merge-conflict
88
- id: check-case-conflict
9-
# - repo: https://github.com/pre-commit/mirrors-clang-format
10-
# rev: v19.1.5
11-
# hooks:
12-
# - id: clang-format
13-
# 'types_or': [c++, c]
9+
- repo: https://github.com/pre-commit/mirrors-clang-format
10+
rev: v19.1.5
11+
hooks:
12+
- id: clang-format
13+
'types_or': [c++, c]
1414

1515
ci:
1616
autofix_commit_msg: "[pre-commit.ci] Auto fixes from pre-commit.com hooks."

0 commit comments

Comments
 (0)