6 Star 9 Fork 3

ALP / GraphBLAS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.clang-format 5.57 KB
一键复制 编辑 原始数据 按行查看 历史
Albert-Jan Yzelman 提交于 2022-01-29 16:50 . Bump to version 0.4
#
# Copyright 2021 Huawei Technologies Co., Ltd.
#
# 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
#
# http://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.
#
Language: Cpp
# assumes clang-format 11 https://releases.llvm.org/11.0.0/tools/clang/docs/ClangFormatStyleOptions.html
# which is available in Ubuntu 20.04 as clang-format-11
BasedOnStyle: Mozilla
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
#AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: false
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
#AllowShortEnumsOnASingleLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: false
BraceWrapping:
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
# AfterCaseLabel: true
# AfterClass: false
# AfterControlStatement: Never
# AfterEnum: false
# AfterFunction: false
# AfterNamespace: false
# AfterObjCDeclaration: false
# AfterStruct: false
# AfterUnion: false
# AfterExternBlock: false
# BeforeCatch: false
# BeforeElse: false
## BeforeLambdaBody: false
## BeforeWhile: false
# IndentBraces: false
# SplitEmptyFunction: true
# SplitEmptyRecord: true
# SplitEmptyNamespace: true
BreakBeforeTernaryOperators: false
BreakBeforeInheritanceComma: false
#BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
#BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 200
#CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
# ATTENTION:
# setting this option to a value other than 0 may cause the indentation
# to be unstable: multiple runs of the linter would keep changing
# the same file back and forth and loop between two different text layouts
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
#EmptyLineBeforeAccessModifier: Always
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
IncludeBlocks: Regroup
IncludeCategories:
#
# Extended Regular Expressions:
# https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html
#
# first match full path graphblas includes, but put them third
- Regex: '^([<|"]graphblas/)'
Priority: 1
SortPriority: 3
# then match standard includes (i.e. headers in <> without extension) and put them first
- Regex: '^<([A-Za-z0-9\Q/-_\E]+)>'
Priority: 2
SortPriority: 1
# then match standard headers starting with "std" and with extension and put them also in the first group
- Regex: '^<(std[A-Za-z0-9\Q/-_\E]*\.h)>'
Priority: 3
SortPriority: 1
# then match other headers in <> with extensions and put in the second group
- Regex: '^<([A-Za-z0-9.\Q/-_\E]+\.h[h|pp|xx]?)>'
Priority: 4
SortPriority: 2
# finally includes within "" and put them last
- Regex: '".*"'
Priority: 5
SortPriority: 4
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
#IndentCaseBlocks: false
IndentCaseLabels: true
#IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
#InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
PenaltyBreakAssignment: 100
PenaltyBreakBeforeFirstCallParameter: 5
PenaltyBreakComment: 1
PenaltyBreakFirstLessLess: 5
PenaltyBreakString: 1
PenaltyBreakTemplateDeclaration: 1
PenaltyExcessCharacter: 1000
PenaltyReturnTypeOnItsOwnLine: 20
PointerAlignment: Middle
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: true
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: Never
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: true
SpacesInConditionalStatement: true
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: true
SpacesInSquareBrackets: true
SpaceBeforeSquareBrackets: false
Standard: c++11
TabWidth: 4
UseCRLF: false
UseTab: AlignWithSpaces
#WhitespaceSensitiveMacros:
# - STRINGIZE
# - PP_STRINGIZE
C++
1
https://gitee.com/CSL-ALP/graphblas.git
git@gitee.com:CSL-ALP/graphblas.git
CSL-ALP
graphblas
GraphBLAS
master

搜索帮助