Skip to content

Commit

Permalink
fixup! Add a clang-format file and prepare for clang-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bbarenblat committed Aug 8, 2023
1 parent 00a2eb2 commit 234acdc
Showing 1 changed file with 21 additions and 41 deletions.
62 changes: 21 additions & 41 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,42 +1,22 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

Standard: C++03
BasedOnStyle: Google
AccessModifierOffset: -2
AlignConsecutiveMacros: true
AlignOperands: AlignAfterOperator
AlignTrailingComments: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: BeforeColon
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerAlignment: false
FixNamespaceComments: false
IncludeBlocks: Preserve
IndentCaseBlocks: true
IndentCaseLabels: false
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: true
NamespaceIndentation: All
PointerAlignment: Right
SpaceBeforeCpp11BracedList: true
---
Language: Cpp
BasedOnStyle: Mozilla
ColumnLimit: 116
SpacesInParentheses: true
SpacesInSquareBrackets: true
AlwaysBreakAfterReturnType: None
AlwaysBreakAfterDefinitionReturnType: None
SpaceBeforeCpp11BracedList: true
BreakBeforeBinaryOperators: All
Cpp11BracedListStyle: true
AllowShortBlocksOnASingleLine: Always
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: Never
AfterFunction: true
AfterStruct: true
AfterEnum: true
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
...

0 comments on commit 234acdc

Please sign in to comment.