summaryrefslogtreecommitdiff
path: root/.clang-format
blob: 50769463cccc89d25a2fb01576edfd171306d0e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
# Global Options Go Here
IndentWidth: 4
ColumnLimit: 80
---
Language: Cpp
BasedOnStyle: Google
AccessModifierOffset: -3  # to match cpplint
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
DerivePointerAlignment: false
ForEachMacros: []
IndentWidth: 4
PointerAlignment: Left  # Google style allows both, but clang-format doesn't
SpacesBeforeTrailingComments: 2
---
# We rely mostly on eslint for JavaScript linting, but this is a lax collection
# of rules that will auto-fix some JS things. We really should use eslint --fix
# instead, but we need to find a way to get that to operate on diffs like
# clang-format does.
Language: JavaScript
AlignAfterOpenBracket: DontAlign
AllowShortFunctionsOnASingleLine: false
JavaScriptQuotes: Leave  # It's not smart enough to allow " to minimize escapes
PenaltyBreakBeforeFirstCallParameter: 1000000
PenaltyExcessCharacter: 1
SpacesBeforeTrailingComments: 2
SpacesInContainerLiterals: false
...