Skip to content

Commit cdb6c60

Browse files
shijiashuaiqwencoder
andcommitted
ci: add missing .clang-format file to repository
This file was present locally but not committed, causing CI formatting checks to fail with default LLVM style instead of our custom configuration. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
1 parent c9f86cd commit cdb6c60

1 file changed

Lines changed: 133 additions & 0 deletions

File tree

.clang-format

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# N-Body Simulation Code Style Configuration
2+
# Based on LLVM style with project-specific customizations
3+
# Run: clang-format --style=file <filename>
4+
5+
BasedOnStyle: LLVM
6+
7+
# Indentation
8+
IndentWidth: 2
9+
TabWidth: 2
10+
UseTab: Never
11+
IndentCaseLabels: false
12+
IndentPPDirectives: None
13+
IndentExternBlock: AfterExternBlock
14+
IndentWrappedFunctionNames: false
15+
16+
# Alignment
17+
AlignAfterOpenBracket: Align
18+
AlignArrayOfStructures: None
19+
AlignConsecutiveAssignments: None
20+
AlignConsecutiveBitFields: None
21+
AlignConsecutiveDeclarations: None
22+
AlignConsecutiveMacros: None
23+
AlignEscapedNewlines: Left
24+
AlignOperands: Align
25+
AlignTrailingComments: true
26+
27+
# Line Breaking
28+
AllowAllArgumentsOnNextLine: true
29+
AllowAllParametersOfDeclarationOnNextLine: true
30+
AllowShortBlocksOnASingleLine: Empty
31+
AllowShortCaseLabelsOnASingleLine: false
32+
AllowShortEnumsOnASingleLine: true
33+
AllowShortFunctionsOnASingleLine: Inline
34+
AllowShortIfStatementsOnASingleLine: Never
35+
AllowShortLambdasOnASingleLine: All
36+
AllowShortLoopsOnASingleLine: false
37+
AlwaysBreakAfterReturnType: None
38+
AlwaysBreakBeforeMultilineStrings: false
39+
AlwaysBreakTemplateDeclarations: Yes
40+
BreakBeforeBinaryOperators: None
41+
BreakBeforeBraces: Attach
42+
BreakBeforeConceptDeclarations: true
43+
BreakBeforeTernaryOperators: true
44+
BreakConstructorInitializers: BeforeColon
45+
BreakInheritanceList: BeforeColon
46+
BreakStringLiterals: true
47+
48+
# Braces
49+
BraceWrapping:
50+
AfterCaseLabel: false
51+
AfterClass: false
52+
AfterControlStatement: Never
53+
AfterEnum: false
54+
AfterFunction: false
55+
AfterNamespace: false
56+
AfterStruct: false
57+
AfterUnion: false
58+
AfterExternBlock: false
59+
BeforeCatch: false
60+
BeforeElse: false
61+
BeforeLambdaBody: false
62+
BeforeWhile: false
63+
IndentBraces: false
64+
SplitEmptyFunction: true
65+
SplitEmptyRecord: true
66+
SplitEmptyNamespace: true
67+
68+
# Spacing
69+
BitFieldColonSpacing: Both
70+
SpaceAfterCStyleCast: false
71+
SpaceAfterLogicalNot: false
72+
SpaceAfterTemplateKeyword: true
73+
SpaceAroundPointerQualifiers: Default
74+
SpaceBeforeAssignmentOperators: true
75+
SpaceBeforeCaseColon: false
76+
SpaceBeforeCpp11BracedList: false
77+
SpaceBeforeCtorInitializerColon: true
78+
SpaceBeforeInheritanceColon: true
79+
SpaceBeforeParens: ControlStatements
80+
SpaceBeforeRangeBasedForLoopColon: true
81+
SpaceBeforeSquareBrackets: false
82+
SpaceInEmptyBlock: false
83+
SpaceInEmptyParentheses: false
84+
SpacesBeforeTrailingComments: 2
85+
SpacesInAngles: Never
86+
SpacesInCStyleCastParentheses: false
87+
SpacesInConditionalStatement: false
88+
SpacesInContainerLiterals: true
89+
SpacesInParentheses: false
90+
SpacesInSquareBrackets: false
91+
92+
# Pointer/Reference Alignment
93+
DerivePointerAlignment: false
94+
PointerAlignment: Left
95+
ReferenceAlignment: Left
96+
97+
# Columns
98+
ColumnLimit: 100
99+
PenaltyBreakAssignment: 2
100+
PenaltyBreakBeforeFirstCallParameter: 19
101+
PenaltyBreakComment: 300
102+
PenaltyBreakFirstLessLess: 120
103+
PenaltyBreakString: 1000
104+
PenaltyBreakTemplateDeclaration: 10
105+
PenaltyExcessCharacter: 1000000
106+
PenaltyIndentedWhitespace: 0
107+
PenaltyReturnTypeOnItsOwnLine: 60
108+
109+
# Includes
110+
IncludeBlocks: Preserve
111+
SortIncludes: CaseSensitive
112+
SortUsingDeclarations: true
113+
114+
# Other
115+
BinPackArguments: true
116+
BinPackParameters: true
117+
CompactNamespaces: false
118+
Cpp11BracedListStyle: true
119+
EmptyLineAfterAccessModifier: Never
120+
EmptyLineBeforeAccessModifier: LogicalBlock
121+
FixNamespaceComments: true
122+
InsertBraces: false
123+
InsertTrailingCommas: None
124+
KeepEmptyLinesAtTheStartOfBlocks: false
125+
MaxEmptyLinesToKeep: 1
126+
NamespaceIndentation: None
127+
PackConstructorInitializers: NextLine
128+
ReflowComments: true
129+
SeparateDefinitionBlocks: Leave
130+
ShortNamespaceLines: 1
131+
132+
# C++11/14/17/20 features
133+
Standard: c++17

0 commit comments

Comments
 (0)