Skip to content

Commit

Permalink
clang-format: stop breaking my includes
Browse files Browse the repository at this point in the history
Configure clang-format such that include blocks (groups of #include separated by
newlines) are preserved. This will prevent clang-format from reordering includes
in a silly way, for instance moving config.h to a place where it breaks the
build as _GNU_SOURCE is no longer defined early enough.

See https://clang.llvm.org/docs/ClangFormatStyleOptions.html for details on the
option used.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
  • Loading branch information
bboozzoo committed Aug 16, 2021
1 parent 5edaf37 commit 33d4688
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
BasedOnStyle: Google
IndentWidth: 4
ColumnLimit: 120
IncludeBlocks: Preserve

0 comments on commit 33d4688

Please sign in to comment.