Skip to content
This repository has been archived by the owner on Apr 18, 2022. It is now read-only.

Commit

Permalink
Add configuration for clang-format.
Browse files Browse the repository at this point in the history
This allows developers to auto-format the C code with clang-format.
It’s not 100% accurate, but works pretty well for most of the C code.
  • Loading branch information
phst committed Sep 24, 2017
1 parent 1eb4e5c commit 108df97
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Language: Cpp
BasedOnStyle: LLVM
AlignEscapedNewlinesLeft: true
AlwaysBreakAfterReturnType: TopLevelDefinitions
BreakBeforeBinaryOperators: All
BreakBeforeBraces: GNU
ColumnLimit: 80
ContinuationIndentWidth: 2
ForEachMacros: [FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE]
IncludeCategories:
- Regex: '^<config\.h>$'
Priority: -1
- Regex: '^<'
Priority: 1
- Regex: '^"lisp\.h"$'
Priority: 2
- Regex: '.*'
Priority: 3
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
PenaltyBreakBeforeFirstCallParameter: 2000
SpaceAfterCStyleCast: true
SpaceBeforeParens: Always

# Local Variables:
# mode: yaml
# End:

0 comments on commit 108df97

Please sign in to comment.