Skip to content

Commit

Permalink
Format: add .clang-format file
Browse files Browse the repository at this point in the history
  • Loading branch information
eric15342335 committed Apr 4, 2024
1 parent 01eac2a commit 8d9516e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
Standard: Cpp11
Language: Cpp
UseTab: ForContinuationAndIndentation
IndentWidth: '4'
TabWidth: '4'

BreakBeforeBraces: Custom
BraceWrapping:
BeforeElse: True

DerivePointerAlignment: 'false'
PointerAlignment: Middle

ReflowComments: 'true'

...
2 changes: 1 addition & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
uses: actions/checkout@v3
- name: Run clang-format
run: |
clang-format --dry-run -style=google $(find . -name '*.cpp' -or -name '*.h')
clang-format --Werror --dry-run $(find . -name '*.cpp' -or -name '*.h')

0 comments on commit 8d9516e

Please sign in to comment.