Skip to content

Commit

Permalink
C stubs: add a .clang-format
Browse files Browse the repository at this point in the history
We may intend to upstream the xenctrlext stubs to Xen, so it should follow
the Xen CODING_STYLE.
The .clang-format here is based on a version I sent upstream that tries to
follow that coding style.

Signed-off-by: Edwin Török <[email protected]>
  • Loading branch information
edwintorok committed Feb 16, 2023
1 parent 6b386b8 commit 8545741
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
BasedOnStyle: GNU
IndentWidth: 4

# override GNU to match Xen ../../CODING_STYLE more closely
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
SpacesInConditionalStatement: true
SpaceBeforeParens: ControlStatements
BreakBeforeBraces: Allman
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ doc-json:

format:
dune build @fmt --auto-promote
git ls-files '*.c' '*.h' | xargs clang-format -i

.PHONY: quality-gate
quality-gate:
Expand Down

0 comments on commit 8545741

Please sign in to comment.