Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
1fff7379
Commit
1fff7379
authored
Dec 18, 2019
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clang-format-9
parent
b40c6c86
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
.clang-format
.clang-format
+11
-5
doc/sources/contribute.rst
doc/sources/contribute.rst
+2
-2
No files found.
.clang-format
View file @
1fff7379
...
@@ -2,16 +2,20 @@
...
@@ -2,16 +2,20 @@
Language: Cpp
Language: Cpp
AccessModifierOffset: -2
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignEscapedNewlines: Right
AlignOperands: true
AlignOperands: true
AlignTrailingComments: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakAfterReturnType: None
...
@@ -19,7 +23,8 @@ AlwaysBreakBeforeMultilineStrings: false
...
@@ -19,7 +23,8 @@ AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackArguments: true
BinPackParameters: true
BinPackParameters: true
BraceWrapping:
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterClass: false
AfterControlStatement: false
AfterControlStatement: false
AfterEnum: false
AfterEnum: false
...
@@ -55,12 +60,12 @@ DerivePointerAlignment: false
...
@@ -55,12 +60,12 @@ DerivePointerAlignment: false
DisableFormat: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
FixNamespaceComments: true
ForEachMacros:
ForEachMacros:
- foreach
- foreach
- Q_FOREACH
- Q_FOREACH
- BOOST_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeBlocks: Preserve
IncludeCategories:
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)'
- Regex: '^(<|"(gtest|isl|json)/)'
...
@@ -96,6 +101,7 @@ ReflowComments: true
...
@@ -96,6 +101,7 @@ ReflowComments: true
SortIncludes: false
SortIncludes: false
SortUsingDeclarations: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCpp11BracedList: false
...
@@ -111,7 +117,7 @@ SpacesInCStyleCastParentheses: false
...
@@ -111,7 +117,7 @@ SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpacesInSquareBrackets: false
Standard: Cpp11
Standard: Cpp11
StatementMacros:
StatementMacros:
- Q_UNUSED
- Q_UNUSED
- QT_REQUIRE_VERSION
- QT_REQUIRE_VERSION
TabWidth: 8
TabWidth: 8
...
...
doc/sources/contribute.rst
View file @
1fff7379
...
@@ -26,14 +26,14 @@ Coding style
...
@@ -26,14 +26,14 @@ Coding style
We use clang-format to format source code consistently. The
We use clang-format to format source code consistently. The
clang-format configuration file .clang-format is located at the root
clang-format configuration file .clang-format is located at the root
directory. Since clang-format produces slightly different results
directory. Since clang-format produces slightly different results
between versions, we currently use clang-format-
8
.
between versions, we currently use clang-format-
9
.
To detect any violation to the coding style, we recommend to setup git
To detect any violation to the coding style, we recommend to setup git
pre-commit hook to check coding style of the changes you introduced.
pre-commit hook to check coding style of the changes you introduced.
The pre-commit file is located at the root directory. Copy it under
The pre-commit file is located at the root directory. Copy it under
.git/hooks and make sure that it is executable. The pre-commit script
.git/hooks and make sure that it is executable. The pre-commit script
uses clang-format-diff.py to detect any style errors. If it is not in
uses clang-format-diff.py to detect any style errors. If it is not in
your PATH or it exists under different name (e.g., clang-format-diff-
8
your PATH or it exists under different name (e.g., clang-format-diff-
9
in debian), either add it to PATH variable or add git option
in debian), either add it to PATH variable or add git option
``clangformatdiff.binary`` to point to the script.
``clangformatdiff.binary`` to point to the script.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment