-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy path.clang-format
More file actions
49 lines (40 loc) · 1.33 KB
/
.clang-format
File metadata and controls
49 lines (40 loc) · 1.33 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 2017 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Defines the Chromium style for automatic reformatting.
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Chromium
# Please keep all directives after this one sorted alphabetically.
InsertNewlineAtEOF: true
# C++ settings.
---
Language: Cpp
# This is permitted by the Google and Chromium style guides.
AllowAllParametersOfDeclarationOnNextLine: true
# NOLINT(reason) is used heavily by existing code.
CommentPragmas: 'NOLINT:.*'
# Group includes into four distinct groups and sort them case insensitively.
IncludeBlocks: Regroup
IncludeIsMainRegex: '([-_](test|unittest))?$'
SortIncludes: CaseInsensitive
IncludeCategories:
# C system includes
- Regex: '^<((arpa|linux|net|netinet|sys)\/([0-9a-z_-]+\/)?)?[0-9a-z_-]+\.h>$'
Priority: 1
# C++ system includes
- Regex: '^<[0-9a-z_-]+>$'
Priority: 2
# Other system libraries
- Regex: '^<.*'
Priority: 3
# Other includes
- Regex: '.*'
Priority: 4
# JavaScript settings.
---
Language: JavaScript
# A few tweaks where the guides permit.
AlignOperands: true
AllowShortFunctionsOnASingleLine: Empty
BinPackArguments: false
MaxEmptyLinesToKeep: 1