Skip to content

Commit a29c6bd

Browse files
Add .clang-format and lizardbyte common submodule
Introduce a repository-wide .clang-format (centrally managed) to standardize C/C++ formatting, update .gitignore to ignore Python virtualenvs (.venv), and add the third-party/lizardbyte-common submodule (pointing to commit 0317edf, branch master).
1 parent 54b2393 commit a29c6bd

4 files changed

Lines changed: 124 additions & 0 deletions

File tree

.clang-format

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
# This file is centrally managed in https://github.com/<organization>/.github/
3+
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
4+
# the above-mentioned repo.
5+
6+
# Generated from CLion C/C++ Code Style settings
7+
BasedOnStyle: LLVM
8+
AccessModifierOffset: -2
9+
AlignAfterOpenBracket: BlockIndent
10+
AlignConsecutiveAssignments: None
11+
AlignEscapedNewlines: DontAlign
12+
AlignOperands: Align
13+
AllowAllArgumentsOnNextLine: false
14+
AllowAllConstructorInitializersOnNextLine: false
15+
AllowAllParametersOfDeclarationOnNextLine: false
16+
AllowShortBlocksOnASingleLine: Empty
17+
AllowShortCaseLabelsOnASingleLine: false
18+
AllowShortEnumsOnASingleLine: false
19+
AllowShortFunctionsOnASingleLine: Empty
20+
AllowShortIfStatementsOnASingleLine: Never
21+
AllowShortLambdasOnASingleLine: None
22+
AllowShortLoopsOnASingleLine: true
23+
AlignTrailingComments: false
24+
AlwaysBreakAfterDefinitionReturnType: None
25+
AlwaysBreakAfterReturnType: None
26+
AlwaysBreakBeforeMultilineStrings: true
27+
AlwaysBreakTemplateDeclarations: MultiLine
28+
BinPackArguments: false
29+
BinPackParameters: false
30+
BracedInitializerIndentWidth: 2
31+
BraceWrapping:
32+
AfterCaseLabel: false
33+
AfterClass: false
34+
AfterControlStatement: Never
35+
AfterEnum: false
36+
AfterExternBlock: true
37+
AfterFunction: false
38+
AfterNamespace: false
39+
AfterObjCDeclaration: false
40+
AfterUnion: false
41+
BeforeCatch: true
42+
BeforeElse: true
43+
IndentBraces: false
44+
SplitEmptyFunction: false
45+
SplitEmptyRecord: true
46+
BreakArrays: true
47+
BreakBeforeBinaryOperators: None
48+
BreakBeforeBraces: Attach
49+
BreakBeforeTernaryOperators: false
50+
BreakConstructorInitializers: AfterColon
51+
BreakInheritanceList: AfterColon
52+
ColumnLimit: 0
53+
CompactNamespaces: false
54+
ContinuationIndentWidth: 2
55+
Cpp11BracedListStyle: true
56+
EmptyLineAfterAccessModifier: Never
57+
EmptyLineBeforeAccessModifier: Always
58+
ExperimentalAutoDetectBinPacking: true
59+
FixNamespaceComments: true
60+
IncludeBlocks: Regroup
61+
IndentAccessModifiers: false
62+
IndentCaseBlocks: true
63+
IndentCaseLabels: true
64+
IndentExternBlock: Indent
65+
IndentGotoLabels: true
66+
IndentPPDirectives: BeforeHash
67+
IndentWidth: 2
68+
IndentWrappedFunctionNames: true
69+
InsertBraces: true
70+
InsertNewlineAtEOF: true
71+
KeepEmptyLinesAtTheStartOfBlocks: false
72+
MaxEmptyLinesToKeep: 1
73+
NamespaceIndentation: All
74+
ObjCBinPackProtocolList: Never
75+
ObjCSpaceAfterProperty: true
76+
ObjCSpaceBeforeProtocolList: true
77+
PackConstructorInitializers: Never
78+
PenaltyBreakBeforeFirstCallParameter: 1
79+
PenaltyBreakComment: 1
80+
PenaltyBreakString: 1
81+
PenaltyBreakFirstLessLess: 0
82+
PenaltyExcessCharacter: 1000000
83+
PenaltyReturnTypeOnItsOwnLine: 100000000
84+
PointerAlignment: Right
85+
ReferenceAlignment: Pointer
86+
ReflowComments: true
87+
RemoveBracesLLVM: false
88+
RemoveSemicolon: false
89+
SeparateDefinitionBlocks: Always
90+
SortIncludes: CaseInsensitive
91+
SortUsingDeclarations: Lexicographic
92+
SpaceAfterCStyleCast: true
93+
SpaceAfterLogicalNot: false
94+
SpaceAfterTemplateKeyword: false
95+
SpaceBeforeAssignmentOperators: true
96+
SpaceBeforeCaseColon: false
97+
SpaceBeforeCpp11BracedList: true
98+
SpaceBeforeCtorInitializerColon: false
99+
SpaceBeforeInheritanceColon: false
100+
SpaceBeforeJsonColon: false
101+
SpaceBeforeParens: ControlStatements
102+
SpaceBeforeRangeBasedForLoopColon: true
103+
SpaceBeforeSquareBrackets: false
104+
SpaceInEmptyBlock: false
105+
SpaceInEmptyParentheses: false
106+
SpacesBeforeTrailingComments: 2
107+
SpacesInAngles: Never
108+
SpacesInCStyleCastParentheses: false
109+
SpacesInContainerLiterals: false
110+
SpacesInLineCommentPrefix:
111+
Maximum: 3
112+
Minimum: 1
113+
SpacesInParentheses: false
114+
SpacesInSquareBrackets: false
115+
TabWidth: 2
116+
UseTab: Never

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# JetBrains IDEs
22
.idea/
33

4+
# Python
5+
.venv/
6+
47
# CMake
58
build/
69
cmake-build-*/

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@
55
[submodule "third-party/googletest"]
66
path = third-party/googletest
77
url = https://github.com/google/googletest.git
8+
[submodule "third-party/lizardbyte-common"]
9+
path = third-party/lizardbyte-common
10+
url = https://github.com/LizardByte/lizardbyte-common.git
11+
branch = master

third-party/lizardbyte-common

Submodule lizardbyte-common added at 0317edf

0 commit comments

Comments
 (0)