Skip to content

Commit bc3cec9

Browse files
committed
style: Use clang-format
1 parent d8c7ee0 commit bc3cec9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+8650
-6089
lines changed

.clang-format

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
# See all possible options and defaults with:
3+
# clang-format --style=llvm --dump-config
4+
BasedOnStyle: LLVM
5+
AlignConsecutiveAssignments: true
6+
AlwaysBreakTemplateDeclarations: Yes
7+
BinPackArguments: false
8+
BinPackParameters: false
9+
BreakBeforeBinaryOperators: All
10+
BreakConstructorInitializers: BeforeComma
11+
ColumnLimit: 99
12+
IndentPPDirectives: AfterHash
13+
IndentWidth: 4
14+
Language: Cpp
15+
SpaceAfterCStyleCast: true
16+
# SpaceInEmptyBlock: true # too new
17+
Standard: Cpp11
18+
TabWidth: 4
19+
...

.pre-commit-config.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,15 @@ repos:
2626
- id: flake8
2727
additional_dependencies: [flake8-bugbear]
2828
exclude: ^(docs/.*|tools/.*)$
29+
30+
- repo: local
31+
hooks:
32+
- id: docker-clang-format
33+
name: Docker Clang Format
34+
language: docker_image
35+
types:
36+
- c++
37+
entry: unibeautify/clang-format:latest
38+
args:
39+
- -style=file
40+
- -i

0 commit comments

Comments
 (0)