Skip to content
Draft
15 changes: 15 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
BasedOnStyle: Mozilla
Language: Cpp
ColumnLimit: 100
AlignAfterOpenBracket: AlwaysBreak
IndentWidth: 4
ContinuationIndentWidth: 4
PointerAlignment: Middle
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: AcrossEmptyLinesAndComments
SortIncludes: false
BraceWrapping:
AfterFunction: true
BreakBeforeBraces: Custom

15 changes: 15 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: style-checks
on: [push, pull_request]
jobs:
clang-format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- run: sudo apt-get update
- run: sudo apt-get install -y clang-format
- name: run git-clang-format
run: clang-format --style=file --dry-run --Werror `git ls-files *.c *.h` >clang-format-diff 2>&1
shell: bash
- name: output clang format diff
if: always()
run: cat ./clang-format-diff
Loading