Skip to content

Commit da60324

Browse files
authored
Initial commit
0 parents  commit da60324

54 files changed

Lines changed: 9555 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
---
2+
BasedOnStyle: LLVM
3+
---
4+
Language: Cpp
5+
AccessModifierOffset: -2
6+
AlignAfterOpenBracket: Align
7+
AlignArrayOfStructures: None
8+
AlignConsecutiveAssignments: None
9+
AlignConsecutiveBitFields: Consecutive
10+
AlignConsecutiveDeclarations: None
11+
AlignConsecutiveMacros: Consecutive
12+
AlignConsecutiveShortCaseStatements:
13+
Enabled: true
14+
AcrossEmptyLines: false
15+
AcrossComments: false
16+
AlignCaseArrows: false
17+
AlignCaseColons: false
18+
AlignEscapedNewlines: Left
19+
AlignOperands: true
20+
AlignTrailingComments: true
21+
AllowAllArgumentsOnNextLine: true
22+
AllowAllParametersOfDeclarationOnNextLine: true
23+
AllowBreakBeforeNoexceptSpecifier: OnlyWithParen
24+
AllowShortBlocksOnASingleLine: Empty
25+
AllowShortCaseExpressionOnASingleLine: true
26+
AllowShortCaseLabelsOnASingleLine: true
27+
AllowShortCompoundRequirementOnASingleLine: true
28+
AllowShortEnumsOnASingleLine: true
29+
AllowShortFunctionsOnASingleLine: Inline
30+
AllowShortIfStatementsOnASingleLine: Never
31+
AllowShortLambdasOnASingleLine: All
32+
AllowShortLoopsOnASingleLine: false
33+
AllowShortNamespacesOnASingleLine: false
34+
AlwaysBreakBeforeMultilineStrings: false
35+
AttributeMacros: []
36+
BinPackArguments: true
37+
BinPackParameters: true
38+
BitFieldColonSpacing: Both
39+
BreakAdjacentStringLiterals: false
40+
BreakAfterAttributes: Leave
41+
BreakAfterJavaFieldAnnotations: true
42+
BreakAfterReturnType: Automatic
43+
BreakBeforeBinaryOperators: None
44+
BreakBeforeBraces: Attach
45+
BreakBeforeConceptDeclarations: true
46+
BreakBeforeInlineASMColon: OnlyMultiline
47+
BreakBeforeTemplateCloser: true
48+
BreakBeforeTernaryOperators: true
49+
BreakBinaryOperations: RespectPrecedence
50+
BreakConstructorInitializers: BeforeComma
51+
BreakFunctionDefinitionParameters: false
52+
BreakInheritanceList: BeforeComma
53+
BreakStringLiterals: false
54+
BreakTemplateDeclarations: Yes
55+
ColumnLimit: 80
56+
CommentPragmas: '^ IWYU pragma:'
57+
CompactNamespaces: false
58+
ConstructorInitializerIndentWidth: 2
59+
ContinuationIndentWidth: 2
60+
Cpp11BracedListStyle: true
61+
DerivePointerAlignment: false
62+
DisableFormat: false
63+
EmptyLineAfterAccessModifier: Never
64+
EmptyLineBeforeAccessModifier: LogicalBlock
65+
EnumTrailingComma: Leave
66+
ExperimentalAutoDetectBinPacking: false
67+
FixNamespaceComments: true
68+
ForEachMacros: []
69+
IncludeBlocks: Regroup
70+
IncludeCategories: # the order of declaration matters!
71+
- Regex: '.(gtest|gmock)\/.+'
72+
Priority: 2
73+
- Regex: '<.+>'
74+
Priority: 3
75+
- Regex: '".*"'
76+
Priority: 1
77+
IncludeIsMainRegex: '(Test|-test|_test)?$'
78+
IncludeIsMainSourceRegex: '(_impl\.hpp)$'
79+
IndentAccessModifiers: false
80+
IndentCaseBlocks: false
81+
IndentCaseLabels: false
82+
IndentExportBlock: false
83+
IndentExternBlock: NoIndent
84+
IndentGotoLabels: false
85+
IndentPPDirectives: None
86+
IndentRequiresClause: true
87+
IndentWidth: 2
88+
IndentWrappedFunctionNames: false
89+
InsertBraces: true
90+
InsertNewlineAtEOF: true
91+
InsertTrailingCommas: None
92+
IntegerLiteralSeparator:
93+
Binary: 0
94+
Decimal: 3
95+
Hex: -1
96+
KeepEmptyLines:
97+
AtEndOfFile: false
98+
AtStartOfBlock: false
99+
AtStartOfFile: false
100+
KeepFormFeed: false
101+
LambdaBodyIndentation: Signature
102+
LineEnding: LF
103+
MacroBlockBegin: ''
104+
MacroBlockEnd: ''
105+
Macros: []
106+
MacrosSkippedByRemoveParentheses: []
107+
MainIncludeChar: Quote
108+
MaxEmptyLinesToKeep: 1
109+
NamespaceIndentation: None
110+
NamespaceMacros: []
111+
OneLineFormatOffRegex: ''
112+
PPIndentWidth: 2
113+
PackConstructorInitializers: Never
114+
PenaltyBreakAssignment: 2
115+
PenaltyBreakBeforeFirstCallParameter: 19
116+
PenaltyBreakBeforeMemberAccess: 0
117+
PenaltyBreakComment: 300
118+
PenaltyBreakFirstLessLess: 120
119+
PenaltyBreakOpenParenthesis: 0
120+
PenaltyBreakString: 1000
121+
PenaltyBreakTemplateDeclaration: 10
122+
PenaltyExcessCharacter: 1000000
123+
PenaltyIndentedWhitespace: 1
124+
PenaltyReturnTypeOnItsOwnLine: 1000
125+
PointerAlignment: Left
126+
QualifierAlignment: Custom
127+
QualifierOrder: ['static', 'inline', 'constexpr', 'const', 'volatile', 'restrict', 'type']
128+
RawStringFormats:
129+
- Language: Cpp
130+
Delimiters:
131+
- 'cc'
132+
- 'cpp'
133+
CanonicalDelimiter: 'cpp'
134+
- Language: TextProto
135+
Delimiters:
136+
- 'pb'
137+
- 'proto'
138+
EnclosingFunctions:
139+
- 'PARSE_TEXT_PROTO'
140+
BasedOnStyle: google
141+
ReferenceAlignment: Left
142+
ReflowComments: true
143+
RemoveBracesLLVM: false
144+
RemoveEmptyLinesInUnwrappedLines: true
145+
RemoveParentheses: ReturnStatement
146+
RemoveSemicolon: true
147+
RequiresClausePosition: OwnLine
148+
RequiresExpressionIndentation: OuterScope
149+
SeparateDefinitionBlocks: Always
150+
ShortNamespaceLines: 0
151+
SkipMacroDefinitionBody: false
152+
SortIncludes: true
153+
SortJavaStaticImport: Before
154+
SortUsingDeclarations: true
155+
SpaceAfterCStyleCast: false
156+
SpaceAfterLogicalNot: false
157+
SpaceAfterOperatorKeyword: false
158+
SpaceAfterTemplateKeyword: false
159+
SpaceAroundPointerQualifiers: Default
160+
SpaceBeforeAssignmentOperators: true
161+
SpaceBeforeCpp11BracedList: false
162+
SpaceBeforeCtorInitializerColon: true
163+
SpaceBeforeInheritanceColon: true
164+
SpaceBeforeParens: ControlStatements
165+
SpaceBeforeRangeBasedForLoopColon: true
166+
SpaceBeforeSquareBrackets: false
167+
SpaceInEmptyBlock: false
168+
SpacesBeforeTrailingComments: 1
169+
SpacesInAngles: Never
170+
SpacesInContainerLiterals: true
171+
SpacesInLineCommentPrefix:
172+
Minimum: 1
173+
Maximum: 1
174+
SpacesInParens: Never
175+
SpacesInSquareBrackets: false
176+
Standard: Latest
177+
StatementAttributeLikeMacros: []
178+
StatementMacros: []
179+
TabWidth: 2
180+
TemplateNames: []
181+
TypeNames: []
182+
TypenameMacros: []
183+
UseTab: Never
184+
VariableTemplates: []
185+
WhitespaceSensitiveMacros: []
186+
WrapNamespaceBodyWithEmptyLines: Leave
187+
---
188+
Language: JavaScript
189+
SpacesInContainerLiterals: false
190+
JavaScriptQuotes: Double
191+
JavaScriptWrapImports: true
192+
...

.clang-format-ignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# You can create .clang-format-ignore files to make clang-format ignore certain files.
2+
# A .clang-format-ignore file consists of patterns of file path names.
3+
# It has the following format:
4+
# - A blank line is skipped.
5+
# - Leading and trailing spaces of a line are trimmed.
6+
# - A line starting with a hash (#) is a comment.
7+
# - A non-comment line is a single pattern.
8+
# - The slash (/) is used as the directory separator.
9+
# - A pattern is relative to the directory of the .clang-format-ignore file (or the root directory if the pattern starts with a slash).
10+
# Patterns containing drive names (e.g. C:) are not supported.
11+
# - Patterns follow the rules specified in POSIX 2.13.1, 2.13.2, and Rule 1 of 2.13.3.
12+
# (see https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13)
13+
# - A pattern is negated if it starts with a bang (!).
14+
# To match all files in a directory, use e.g. foo/bar/*.
15+
# To match all files in the directory of the .clang-format-ignore file, use *.
16+
# Multiple .clang-format-ignore files are supported similar to the .clang-format files,
17+
# with a lower directory level file voiding the higher level ones.

.clang-tidy

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
Checks: >
3+
*,
4+
-abseil-*,
5+
abseil-no-namespace,
6+
-altera-struct-pack-align,
7+
-altera-unroll-loops,
8+
-android-cloexec-fopen,
9+
-cppcoreguidelines-owning-memory,
10+
-darwin-*,
11+
-fuchsia-*,
12+
fuchsia-statically-constructed-objects,
13+
fuchsia-trailing-return,
14+
-google-readability-todo,
15+
-hicpp-named-parameter,
16+
-llvm-header-guard,
17+
-llvmlibc-*,
18+
-modernize-use-trailing-return-type,
19+
-portability-avoid-pragma-once,
20+
-readability-identifier-length,
21+
-readability-named-parameter,
22+
WarningsAsErrors: ''
23+
HeaderFilterRegex: ''
24+
FormatStyle: none
25+
CheckOptions:
26+
- key: bugprone-exception-escape.FunctionsThatShouldNotThrow
27+
value: 'WinMain;wWinMain'
28+
- key: bugprone-misplaced-widening-cast.CheckImplicitCasts
29+
value: 'true'
30+
- key: bugprone-suspicious-enum-usage.StrictMode
31+
value: 'true'
32+
- key: cppcoreguidelines-avoid-do-while.IgnoreMacros
33+
value: 'true'
34+
- key: cppcoreguidelines-narrowing-conversions.PedanticMode
35+
value: 'true'
36+
- key: google-runtime-int.UnsignedTypePrefix
37+
value: 'std::uint'
38+
- key: google-runtime-int.SignedTypePrefix
39+
value: 'std::int'
40+
- key: google-runtime-int.TypeSuffix
41+
value: '_t'
42+
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
43+
value: 'true'
44+
- key: readability-uppercase-literal-suffix.NewSuffixes
45+
value: 'L;LL;LU;LLU'
46+
- key: readability-identifier-naming.AggressiveDependentMemberLookup
47+
value: 'true'
48+
- key: readability-identifier-naming.TemplateParameterCase
49+
value: CamelCase
50+
- key: readability-identifier-naming.MacroDefinitionCase
51+
value: UPPER_CASE
52+
- key: readability-implicit-bool-conversion.AllowIntegerConditions
53+
value: 'true'
54+
- key: readability-implicit-bool-conversion.AllowPointerConditions
55+
value: 'true'
56+
...

.clangd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CompileFlags:
2+
# adjust for your compile_commands.json location
3+
CompilationDatabase: build/Debug

0 commit comments

Comments
 (0)