Skip to content

Commit ef6d619

Browse files
committed
First
0 parents  commit ef6d619

27 files changed

+1195
-0
lines changed

.clang-format

+178
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: Chromium
4+
AccessModifierOffset: -2
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveMacros: false
7+
AlignConsecutiveAssignments: false
8+
AlignConsecutiveBitFields: false
9+
AlignConsecutiveDeclarations: false
10+
AlignEscapedNewlines: DontAlign
11+
AlignOperands: DontAlign
12+
AlignTrailingComments: false
13+
AllowAllArgumentsOnNextLine: true
14+
AllowAllConstructorInitializersOnNextLine: false
15+
AllowAllParametersOfDeclarationOnNextLine: true
16+
AllowShortEnumsOnASingleLine: false
17+
AllowShortBlocksOnASingleLine: Empty
18+
AllowShortCaseLabelsOnASingleLine: false
19+
AllowShortFunctionsOnASingleLine: Inline
20+
AllowShortLambdasOnASingleLine: All
21+
AllowShortIfStatementsOnASingleLine: Never
22+
AllowShortLoopsOnASingleLine: false
23+
AlwaysBreakAfterDefinitionReturnType: None
24+
AlwaysBreakAfterReturnType: None
25+
AlwaysBreakBeforeMultilineStrings: true
26+
AlwaysBreakTemplateDeclarations: Yes
27+
BinPackArguments: false
28+
BinPackParameters: false
29+
BraceWrapping:
30+
AfterCaseLabel: false
31+
AfterClass: true
32+
AfterControlStatement: MultiLine
33+
AfterEnum: true
34+
AfterFunction: true
35+
AfterNamespace: true
36+
AfterObjCDeclaration: false
37+
AfterStruct: true
38+
AfterUnion: true
39+
AfterExternBlock: true
40+
BeforeCatch: false
41+
BeforeElse: false
42+
BeforeLambdaBody: true
43+
BeforeWhile: false
44+
IndentBraces: false
45+
SplitEmptyFunction: true
46+
SplitEmptyRecord: true
47+
SplitEmptyNamespace: true
48+
BreakBeforeBinaryOperators: NonAssignment
49+
BreakBeforeBraces: Custom
50+
# BreakBeforeInheritanceComma: true
51+
BreakInheritanceList: BeforeComma
52+
BreakBeforeTernaryOperators: true
53+
BreakConstructorInitializersBeforeComma: true
54+
BreakConstructorInitializers: BeforeComma
55+
BreakAfterJavaFieldAnnotations: true
56+
BreakStringLiterals: true
57+
ColumnLimit: 80
58+
CommentPragmas: '^ IWYU pragma:'
59+
CompactNamespaces: false
60+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
61+
ConstructorInitializerIndentWidth: 4
62+
ContinuationIndentWidth: 4
63+
Cpp11BracedListStyle: true
64+
DeriveLineEnding: false
65+
DerivePointerAlignment: false
66+
DisableFormat: false
67+
ExperimentalAutoDetectBinPacking: false
68+
FixNamespaceComments: true
69+
ForEachMacros:
70+
- foreach
71+
- Q_FOREACH
72+
- BOOST_FOREACH
73+
IncludeBlocks: Regroup
74+
IncludeCategories:
75+
# Standard library headers come before anything else
76+
- Regex: '^<[a-z_]+>'
77+
Priority: -1
78+
- Regex: '^<.+\.h(pp)?>'
79+
Priority: 1
80+
- Regex: '^<.*'
81+
Priority: 2
82+
- Regex: '.*'
83+
Priority: 3
84+
IncludeIsMainRegex: ''
85+
IncludeIsMainSourceRegex: ''
86+
IndentCaseLabels: true
87+
IndentCaseBlocks: false
88+
IndentGotoLabels: true
89+
IndentPPDirectives: AfterHash
90+
IndentExternBlock: NoIndent
91+
IndentWidth: 2
92+
IndentWrappedFunctionNames: false
93+
InsertTrailingCommas: Wrapped
94+
JavaScriptQuotes: Double
95+
JavaScriptWrapImports: true
96+
KeepEmptyLinesAtTheStartOfBlocks: false
97+
MacroBlockBegin: ''
98+
MacroBlockEnd: ''
99+
MaxEmptyLinesToKeep: 1
100+
NamespaceIndentation: None
101+
ObjCBinPackProtocolList: Never
102+
ObjCBlockIndentWidth: 2
103+
ObjCBreakBeforeNestedBlockParam: true
104+
ObjCSpaceAfterProperty: false
105+
ObjCSpaceBeforeProtocolList: true
106+
PenaltyBreakAssignment: 2
107+
PenaltyBreakBeforeFirstCallParameter: 1
108+
PenaltyBreakComment: 300
109+
PenaltyBreakFirstLessLess: 120
110+
PenaltyBreakString: 1000
111+
PenaltyBreakTemplateDeclaration: 10
112+
PenaltyExcessCharacter: 1000000
113+
PenaltyReturnTypeOnItsOwnLine: 200
114+
PointerAlignment: Left
115+
RawStringFormats:
116+
- Language: Cpp
117+
Delimiters:
118+
- cc
119+
- CC
120+
- cpp
121+
- Cpp
122+
- CPP
123+
- 'c++'
124+
- 'C++'
125+
CanonicalDelimiter: ''
126+
BasedOnStyle: google
127+
- Language: TextProto
128+
Delimiters:
129+
- pb
130+
- PB
131+
- proto
132+
- PROTO
133+
EnclosingFunctions:
134+
- EqualsProto
135+
- EquivToProto
136+
- PARSE_PARTIAL_TEXT_PROTO
137+
- PARSE_TEST_PROTO
138+
- PARSE_TEXT_PROTO
139+
- ParseTextOrDie
140+
- ParseTextProtoOrDie
141+
- ParseTestProto
142+
- ParsePartialTestProto
143+
CanonicalDelimiter: ''
144+
BasedOnStyle: google
145+
ReflowComments: true
146+
SortIncludes: true
147+
SortUsingDeclarations: true
148+
SpaceAfterCStyleCast: false
149+
SpaceAfterLogicalNot: false
150+
SpaceAfterTemplateKeyword: false
151+
SpaceBeforeAssignmentOperators: true
152+
SpaceBeforeCpp11BracedList: true
153+
SpaceBeforeCtorInitializerColon: true
154+
SpaceBeforeInheritanceColon: true
155+
SpaceBeforeParens: ControlStatementsExceptForEachMacros
156+
SpaceBeforeRangeBasedForLoopColon: true
157+
SpaceInEmptyBlock: false
158+
SpaceInEmptyParentheses: false
159+
SpacesBeforeTrailingComments: 2
160+
SpacesInAngles: false
161+
SpacesInConditionalStatement: false
162+
SpacesInContainerLiterals: false
163+
SpacesInCStyleCastParentheses: false
164+
SpacesInParentheses: false
165+
SpacesInSquareBrackets: false
166+
SpaceBeforeSquareBrackets: false
167+
Standard: Auto
168+
StatementMacros:
169+
- Q_UNUSED
170+
- QT_REQUIRE_VERSION
171+
TabWidth: 8
172+
UseCRLF: false
173+
UseTab: Never
174+
WhitespaceSensitiveMacros:
175+
- STRINGIZE
176+
- PP_STRINGIZE
177+
- BOOST_PP_STRINGIZE
178+
...

.clang-tidy

+155
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
---
2+
# Enable ALL the things! Except not really
3+
# misc-non-private-member-variables-in-classes: the options don't do anything
4+
# modernize-use-nodiscard: too aggressive, attribute is situationally useful
5+
Checks: "*,\
6+
-google-readability-todo,\
7+
-altera-*,\
8+
-fuchsia-*,\
9+
fuchsia-multiple-inheritance,\
10+
-llvm-header-guard,\
11+
-llvm-include-order,\
12+
-llvmlibc-*,\
13+
-modernize-use-nodiscard,\
14+
-misc-non-private-member-variables-in-classes"
15+
WarningsAsErrors: ''
16+
CheckOptions:
17+
- key: 'bugprone-argument-comment.StrictMode'
18+
value: 'true'
19+
# Prefer using enum classes with 2 values for parameters instead of bools
20+
- key: 'bugprone-argument-comment.CommentBoolLiterals'
21+
value: 'true'
22+
- key: 'bugprone-misplaced-widening-cast.CheckImplicitCasts'
23+
value: 'true'
24+
- key: 'bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression'
25+
value: 'true'
26+
- key: 'bugprone-suspicious-string-compare.WarnOnLogicalNotComparison'
27+
value: 'true'
28+
- key: 'readability-simplify-boolean-expr.ChainedConditionalReturn'
29+
value: 'true'
30+
- key: 'readability-simplify-boolean-expr.ChainedConditionalAssignment'
31+
value: 'true'
32+
- key: 'readability-uniqueptr-delete-release.PreferResetCall'
33+
value: 'true'
34+
- key: 'cppcoreguidelines-init-variables.MathHeader'
35+
value: '<cmath>'
36+
- key: 'cppcoreguidelines-narrowing-conversions.PedanticMode'
37+
value: 'true'
38+
- key: 'readability-else-after-return.WarnOnUnfixable'
39+
value: 'true'
40+
- key: 'readability-else-after-return.WarnOnConditionVariables'
41+
value: 'true'
42+
- key: 'readability-inconsistent-declaration-parameter-name.Strict'
43+
value: 'true'
44+
- key: 'readability-qualified-auto.AddConstToQualified'
45+
value: 'true'
46+
- key: 'readability-redundant-access-specifiers.CheckFirstDeclaration'
47+
value: 'true'
48+
# These seem to be the most common identifier styles
49+
- key: 'readability-identifier-naming.AbstractClassCase'
50+
value: 'lower_case'
51+
- key: 'readability-identifier-naming.ClassCase'
52+
value: 'lower_case'
53+
- key: 'readability-identifier-naming.ClassConstantCase'
54+
value: 'lower_case'
55+
- key: 'readability-identifier-naming.ClassMemberCase'
56+
value: 'lower_case'
57+
- key: 'readability-identifier-naming.ClassMethodCase'
58+
value: 'lower_case'
59+
- key: 'readability-identifier-naming.ConstantCase'
60+
value: 'lower_case'
61+
- key: 'readability-identifier-naming.ConstantMemberCase'
62+
value: 'lower_case'
63+
- key: 'readability-identifier-naming.ConstantParameterCase'
64+
value: 'lower_case'
65+
- key: 'readability-identifier-naming.ConstantPointerParameterCase'
66+
value: 'lower_case'
67+
- key: 'readability-identifier-naming.ConstexprFunctionCase'
68+
value: 'lower_case'
69+
- key: 'readability-identifier-naming.ConstexprMethodCase'
70+
value: 'lower_case'
71+
- key: 'readability-identifier-naming.ConstexprVariableCase'
72+
value: 'lower_case'
73+
- key: 'readability-identifier-naming.EnumCase'
74+
value: 'lower_case'
75+
- key: 'readability-identifier-naming.EnumConstantCase'
76+
value: 'lower_case'
77+
- key: 'readability-identifier-naming.FunctionCase'
78+
value: 'lower_case'
79+
- key: 'readability-identifier-naming.GlobalConstantCase'
80+
value: 'lower_case'
81+
- key: 'readability-identifier-naming.GlobalConstantPointerCase'
82+
value: 'lower_case'
83+
- key: 'readability-identifier-naming.GlobalFunctionCase'
84+
value: 'lower_case'
85+
- key: 'readability-identifier-naming.GlobalPointerCase'
86+
value: 'lower_case'
87+
- key: 'readability-identifier-naming.GlobalVariableCase'
88+
value: 'lower_case'
89+
- key: 'readability-identifier-naming.InlineNamespaceCase'
90+
value: 'lower_case'
91+
- key: 'readability-identifier-naming.LocalConstantCase'
92+
value: 'lower_case'
93+
- key: 'readability-identifier-naming.LocalConstantPointerCase'
94+
value: 'lower_case'
95+
- key: 'readability-identifier-naming.LocalPointerCase'
96+
value: 'lower_case'
97+
- key: 'readability-identifier-naming.LocalVariableCase'
98+
value: 'lower_case'
99+
- key: 'readability-identifier-naming.MacroDefinitionCase'
100+
value: 'UPPER_CASE'
101+
- key: 'readability-identifier-naming.MemberCase'
102+
value: 'lower_case'
103+
- key: 'readability-identifier-naming.MethodCase'
104+
value: 'lower_case'
105+
- key: 'readability-identifier-naming.NamespaceCase'
106+
value: 'lower_case'
107+
- key: 'readability-identifier-naming.ParameterCase'
108+
value: 'lower_case'
109+
- key: 'readability-identifier-naming.ParameterPackCase'
110+
value: 'lower_case'
111+
- key: 'readability-identifier-naming.PointerParameterCase'
112+
value: 'lower_case'
113+
- key: 'readability-identifier-naming.PrivateMemberCase'
114+
value: 'lower_case'
115+
- key: 'readability-identifier-naming.PrivateMemberPrefix'
116+
value: 'm_'
117+
- key: 'readability-identifier-naming.PrivateMethodCase'
118+
value: 'lower_case'
119+
- key: 'readability-identifier-naming.ProtectedMemberCase'
120+
value: 'lower_case'
121+
- key: 'readability-identifier-naming.ProtectedMemberPrefix'
122+
value: 'm_'
123+
- key: 'readability-identifier-naming.ProtectedMethodCase'
124+
value: 'lower_case'
125+
- key: 'readability-identifier-naming.PublicMemberCase'
126+
value: 'lower_case'
127+
- key: 'readability-identifier-naming.PublicMethodCase'
128+
value: 'lower_case'
129+
- key: 'readability-identifier-naming.ScopedEnumConstantCase'
130+
value: 'lower_case'
131+
- key: 'readability-identifier-naming.StaticConstantCase'
132+
value: 'lower_case'
133+
- key: 'readability-identifier-naming.StaticVariableCase'
134+
value: 'lower_case'
135+
- key: 'readability-identifier-naming.StructCase'
136+
value: 'lower_case'
137+
- key: 'readability-identifier-naming.TemplateParameterCase'
138+
value: 'CamelCase'
139+
- key: 'readability-identifier-naming.TemplateTemplateParameterCase'
140+
value: 'CamelCase'
141+
- key: 'readability-identifier-naming.TypeAliasCase'
142+
value: 'lower_case'
143+
- key: 'readability-identifier-naming.TypedefCase'
144+
value: 'lower_case'
145+
- key: 'readability-identifier-naming.TypeTemplateParameterCase'
146+
value: 'CamelCase'
147+
- key: 'readability-identifier-naming.UnionCase'
148+
value: 'lower_case'
149+
- key: 'readability-identifier-naming.ValueTemplateParameterCase'
150+
value: 'CamelCase'
151+
- key: 'readability-identifier-naming.VariableCase'
152+
value: 'lower_case'
153+
- key: 'readability-identifier-naming.VirtualMethodCase'
154+
value: 'lower_case'
155+
...

.codespellrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[codespell]
2+
builtin = clear,rare,en-GB_to_en-US,names,informal,code
3+
check-filenames =
4+
check-hidden =
5+
skip = */.git,*/build,*/prefix,*/conan
6+
quiet-level = 2

.github/scripts/conan-ci-setup.sh

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
PS4='\033[1;34m>>>\033[0m '
4+
5+
set -xeu
6+
7+
pip3 install conan
8+
9+
conan profile detect -f
10+
11+
std=20
12+
profile="$(conan profile path default)"
13+
14+
mv "$profile" "${profile}.bak"
15+
sed 's/^\(compiler\.cppstd=\).\{1,\}$/\1'"$std/" "${profile}.bak" > "$profile"
16+
rm "${profile}.bak"
17+
18+
if [ -f conan_cache_save.tgz ]; then
19+
conan cache restore conan_cache_save.tgz
20+
fi
21+
conan remove \* --lru=1M -c
22+
conan install . -b missing
23+
conan cache save '*/*:*' --file=conan_cache_save.tgz

0 commit comments

Comments
 (0)