Skip to content

Commit 0bc63ca

Browse files
Initial commit
0 parents  commit 0bc63ca

36 files changed

+7396
-0
lines changed

.clang-format

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
Language: Cpp
2+
AccessModifierOffset: -1
3+
AlignAfterOpenBracket: Align
4+
AlignConsecutiveAssignments: false
5+
AlignConsecutiveDeclarations: false
6+
AlignEscapedNewlines: DontAlign
7+
AlignOperands: true
8+
AlignTrailingComments: true
9+
AllowAllParametersOfDeclarationOnNextLine: true
10+
AllowShortBlocksOnASingleLine: false
11+
AllowShortCaseLabelsOnASingleLine: false
12+
AllowShortFunctionsOnASingleLine: All
13+
AllowShortIfStatementsOnASingleLine: false
14+
AllowShortLoopsOnASingleLine: false
15+
AlwaysBreakAfterReturnType: None
16+
AlwaysBreakBeforeMultilineStrings: false
17+
AlwaysBreakTemplateDeclarations: MultiLine
18+
BinPackArguments: true
19+
BinPackParameters: true
20+
BraceWrapping:
21+
AfterClass: false
22+
AfterControlStatement: false
23+
AfterEnum: false
24+
AfterFunction: false
25+
AfterNamespace: false
26+
AfterObjCDeclaration: false
27+
AfterStruct: false
28+
AfterUnion: false
29+
AfterExternBlock: false
30+
BeforeCatch: false
31+
BeforeElse: false
32+
IndentBraces: false
33+
SplitEmptyFunction: true
34+
SplitEmptyRecord: true
35+
SplitEmptyNamespace: true
36+
BreakBeforeBinaryOperators: None
37+
BreakBeforeBraces: Attach
38+
BreakBeforeInheritanceComma: false
39+
BreakInheritanceList: BeforeColon
40+
BreakBeforeTernaryOperators: true
41+
BreakConstructorInitializersBeforeComma: false
42+
BreakConstructorInitializers: BeforeColon
43+
BreakAfterJavaFieldAnnotations: false
44+
BreakStringLiterals: true
45+
ColumnLimit: 120
46+
CommentPragmas: '^ IWYU pragma:'
47+
CompactNamespaces: false
48+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
49+
ConstructorInitializerIndentWidth: 4
50+
ContinuationIndentWidth: 4
51+
Cpp11BracedListStyle: true
52+
DerivePointerAlignment: false
53+
DisableFormat: false
54+
ExperimentalAutoDetectBinPacking: false
55+
FixNamespaceComments: true
56+
ForEachMacros:
57+
- foreach
58+
- Q_FOREACH
59+
- BOOST_FOREACH
60+
IncludeBlocks: Preserve
61+
IncludeCategories:
62+
- Regex: '^<ext/.*\.h>'
63+
Priority: 2
64+
- Regex: '^<.*\.h>'
65+
Priority: 1
66+
- Regex: '^<.*'
67+
Priority: 2
68+
- Regex: '.*'
69+
Priority: 3
70+
IncludeIsMainRegex: '([-_](test|unittest))?$'
71+
IndentCaseLabels: true
72+
IndentPPDirectives: None
73+
IndentWidth: 2
74+
IndentWrappedFunctionNames: false
75+
KeepEmptyLinesAtTheStartOfBlocks: false
76+
MacroBlockBegin: ''
77+
MacroBlockEnd: ''
78+
MaxEmptyLinesToKeep: 1
79+
NamespaceIndentation: None
80+
PenaltyBreakAssignment: 2
81+
PenaltyBreakBeforeFirstCallParameter: 1
82+
PenaltyBreakComment: 300
83+
PenaltyBreakFirstLessLess: 120
84+
PenaltyBreakString: 1000
85+
PenaltyBreakTemplateDeclaration: 10
86+
PenaltyExcessCharacter: 1000000
87+
PenaltyReturnTypeOnItsOwnLine: 2000
88+
PointerAlignment: Right
89+
RawStringFormats:
90+
- Language: Cpp
91+
Delimiters:
92+
- cc
93+
- CC
94+
- cpp
95+
- Cpp
96+
- CPP
97+
- 'c++'
98+
- 'C++'
99+
CanonicalDelimiter: ''
100+
BasedOnStyle: google
101+
- Language: TextProto
102+
Delimiters:
103+
- pb
104+
- PB
105+
- proto
106+
- PROTO
107+
EnclosingFunctions:
108+
- EqualsProto
109+
- EquivToProto
110+
- PARSE_PARTIAL_TEXT_PROTO
111+
- PARSE_TEST_PROTO
112+
- PARSE_TEXT_PROTO
113+
- ParseTextOrDie
114+
- ParseTextProtoOrDie
115+
CanonicalDelimiter: ''
116+
BasedOnStyle: google
117+
ReflowComments: true
118+
SortIncludes: false
119+
SortUsingDeclarations: false
120+
SpaceAfterCStyleCast: true
121+
SpaceAfterTemplateKeyword: false
122+
SpaceBeforeAssignmentOperators: true
123+
SpaceBeforeCpp11BracedList: false
124+
SpaceBeforeCtorInitializerColon: true
125+
SpaceBeforeInheritanceColon: true
126+
SpaceBeforeParens: ControlStatements
127+
SpaceBeforeRangeBasedForLoopColon: true
128+
SpaceInEmptyParentheses: false
129+
SpacesBeforeTrailingComments: 2
130+
SpacesInAngles: false
131+
SpacesInContainerLiterals: false
132+
SpacesInCStyleCastParentheses: false
133+
SpacesInParentheses: false
134+
SpacesInSquareBrackets: false
135+
Standard: Auto
136+
TabWidth: 2
137+
UseTab: Never

.clang-tidy

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
---
2+
Checks: >-
3+
*,
4+
-abseil-*,
5+
-altera-*,
6+
-android-*,
7+
-boost-*,
8+
-bugprone-easily-swappable-parameters,
9+
-bugprone-implicit-widening-of-multiplication-result,
10+
-bugprone-multi-level-implicit-pointer-conversion,
11+
-bugprone-narrowing-conversions,
12+
-bugprone-signed-char-misuse,
13+
-bugprone-switch-missing-default-case,
14+
-cert-dcl50-cpp,
15+
-cert-err33-c,
16+
-cert-err58-cpp,
17+
-cert-oop57-cpp,
18+
-cert-str34-c,
19+
-clang-analyzer-optin.core.EnumCastOutOfRange,
20+
-clang-analyzer-optin.cplusplus.UninitializedObject,
21+
-clang-analyzer-osx.*,
22+
-clang-diagnostic-delete-abstract-non-virtual-dtor,
23+
-clang-diagnostic-delete-non-abstract-non-virtual-dtor,
24+
-clang-diagnostic-deprecated-declarations,
25+
-clang-diagnostic-ignored-optimization-argument,
26+
-clang-diagnostic-missing-field-initializers,
27+
-clang-diagnostic-shadow-field,
28+
-clang-diagnostic-unused-const-variable,
29+
-clang-diagnostic-unused-parameter,
30+
-clang-diagnostic-vla-cxx-extension,
31+
-concurrency-*,
32+
-portability-avoid-pragma-once,
33+
-cppcoreguidelines-avoid-c-arrays,
34+
-cppcoreguidelines-avoid-const-or-ref-data-members,
35+
-cppcoreguidelines-avoid-do-while,
36+
-cppcoreguidelines-avoid-magic-numbers,
37+
-cppcoreguidelines-init-variables,
38+
-cppcoreguidelines-macro-to-enum,
39+
-cppcoreguidelines-macro-usage,
40+
-cppcoreguidelines-missing-std-forward,
41+
-cppcoreguidelines-narrowing-conversions,
42+
-cppcoreguidelines-non-private-member-variables-in-classes,
43+
-cppcoreguidelines-owning-memory,
44+
-cppcoreguidelines-prefer-member-initializer,
45+
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
46+
-cppcoreguidelines-pro-bounds-constant-array-index,
47+
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
48+
-cppcoreguidelines-pro-type-const-cast,
49+
-cppcoreguidelines-pro-type-cstyle-cast,
50+
-cppcoreguidelines-pro-type-member-init,
51+
-cppcoreguidelines-pro-type-reinterpret-cast,
52+
-cppcoreguidelines-pro-type-static-cast-downcast,
53+
-cppcoreguidelines-pro-type-union-access,
54+
-cppcoreguidelines-pro-type-vararg,
55+
-cppcoreguidelines-rvalue-reference-param-not-moved,
56+
-cppcoreguidelines-special-member-functions,
57+
-cppcoreguidelines-use-default-member-init,
58+
-cppcoreguidelines-virtual-class-destructor,
59+
-fuchsia-multiple-inheritance,
60+
-fuchsia-overloaded-operator,
61+
-fuchsia-statically-constructed-objects,
62+
-fuchsia-default-arguments-declarations,
63+
-fuchsia-default-arguments-calls,
64+
-google-build-using-namespace,
65+
-google-explicit-constructor,
66+
-google-readability-braces-around-statements,
67+
-google-readability-casting,
68+
-google-readability-namespace-comments,
69+
-google-readability-todo,
70+
-google-runtime-references,
71+
-hicpp-*,
72+
-llvm-else-after-return,
73+
-llvm-header-guard,
74+
-llvm-include-order,
75+
-llvm-qualified-auto,
76+
-llvmlibc-*,
77+
-misc-const-correctness,
78+
-misc-include-cleaner,
79+
-misc-no-recursion,
80+
-misc-non-private-member-variables-in-classes,
81+
-misc-unused-parameters,
82+
-misc-use-anonymous-namespace,
83+
-modernize-avoid-bind,
84+
-modernize-avoid-c-arrays,
85+
-modernize-concat-nested-namespaces,
86+
-modernize-macro-to-enum,
87+
-modernize-return-braced-init-list,
88+
-modernize-type-traits,
89+
-modernize-use-auto,
90+
-modernize-use-constraints,
91+
-modernize-use-default-member-init,
92+
-modernize-use-equals-default,
93+
-modernize-use-nodiscard,
94+
-modernize-use-nullptr,
95+
-modernize-use-nodiscard,
96+
-modernize-use-nullptr,
97+
-modernize-use-trailing-return-type,
98+
-mpi-*,
99+
-objc-*,
100+
-performance-enum-size,
101+
-readability-avoid-nested-conditional-operator,
102+
-readability-container-contains,
103+
-readability-container-data-pointer,
104+
-readability-convert-member-functions-to-static,
105+
-readability-else-after-return,
106+
-readability-function-cognitive-complexity,
107+
-readability-implicit-bool-conversion,
108+
-readability-isolate-declaration,
109+
-readability-magic-numbers,
110+
-readability-make-member-function-const,
111+
-readability-named-parameter,
112+
-readability-redundant-casting,
113+
-readability-redundant-inline-specifier,
114+
-readability-redundant-member-init,
115+
-readability-redundant-string-init,
116+
-readability-uppercase-literal-suffix,
117+
-readability-use-anyofallof,
118+
WarningsAsErrors: '*'
119+
FormatStyle: google
120+
CheckOptions:
121+
- key: google-readability-function-size.StatementThreshold
122+
value: '800'
123+
- key: google-runtime-int.TypeSuffix
124+
value: '_t'
125+
- key: llvm-namespace-comment.ShortNamespaceLines
126+
value: '10'
127+
- key: llvm-namespace-comment.SpacesBeforeComments
128+
value: '2'
129+
- key: modernize-loop-convert.MaxCopySize
130+
value: '16'
131+
- key: modernize-loop-convert.MinConfidence
132+
value: reasonable
133+
- key: modernize-loop-convert.NamingStyle
134+
value: CamelCase
135+
- key: modernize-pass-by-value.IncludeStyle
136+
value: llvm
137+
- key: modernize-replace-auto-ptr.IncludeStyle
138+
value: llvm
139+
- key: modernize-use-nullptr.NullMacros
140+
value: 'NULL'
141+
- key: modernize-make-unique.MakeSmartPtrFunction
142+
value: 'make_unique'
143+
- key: modernize-make-unique.MakeSmartPtrFunctionHeader
144+
value: 'esphome/core/helpers.h'
145+
- key: readability-braces-around-statements.ShortStatementLines
146+
value: 2
147+
- key: readability-identifier-naming.LocalVariableCase
148+
value: 'lower_case'
149+
- key: readability-identifier-naming.ClassCase
150+
value: 'CamelCase'
151+
- key: readability-identifier-naming.StructCase
152+
value: 'CamelCase'
153+
- key: readability-identifier-naming.EnumCase
154+
value: 'CamelCase'
155+
- key: readability-identifier-naming.EnumConstantCase
156+
value: 'UPPER_CASE'
157+
- key: readability-identifier-naming.StaticConstantCase
158+
value: 'UPPER_CASE'
159+
- key: readability-identifier-naming.StaticVariableCase
160+
value: 'lower_case'
161+
- key: readability-identifier-naming.GlobalConstantCase
162+
value: 'UPPER_CASE'
163+
- key: readability-identifier-naming.ParameterCase
164+
value: 'lower_case'
165+
- key: readability-identifier-naming.PrivateMemberCase
166+
value: 'lower_case'
167+
- key: readability-identifier-naming.PrivateMemberSuffix
168+
value: '_'
169+
- key: readability-identifier-naming.PrivateMethodCase
170+
value: 'lower_case'
171+
- key: readability-identifier-naming.PrivateMethodSuffix
172+
value: '_'
173+
- key: readability-identifier-naming.ClassMemberCase
174+
value: 'lower_case'
175+
- key: readability-identifier-naming.ClassMemberCase
176+
value: 'lower_case'
177+
- key: readability-identifier-naming.ProtectedMemberCase
178+
value: 'lower_case'
179+
- key: readability-identifier-naming.ProtectedMemberSuffix
180+
value: '_'
181+
- key: readability-identifier-naming.FunctionCase
182+
value: 'lower_case'
183+
- key: readability-identifier-naming.ClassMethodCase
184+
value: 'lower_case'
185+
- key: readability-identifier-naming.ProtectedMethodCase
186+
value: 'lower_case'
187+
- key: readability-identifier-naming.ProtectedMethodSuffix
188+
value: '_'
189+
- key: readability-identifier-naming.VirtualMethodCase
190+
value: 'lower_case'
191+
- key: readability-identifier-naming.VirtualMethodSuffix
192+
value: ''
193+
- key: readability-qualified-auto.AddConstToQualified
194+
value: 0
195+
- key: readability-identifier-length.MinimumVariableNameLength
196+
value: 0
197+
- key: readability-identifier-length.MinimumParameterNameLength
198+
value: 0
199+
- key: readability-identifier-length.MinimumLoopCounterNameLength
200+
value: 0

.editorconfig

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
root = true
2+
3+
# general
4+
[*]
5+
end_of_line = lf
6+
insert_final_newline = true
7+
charset = utf-8
8+
9+
# python
10+
[*.py]
11+
indent_style = space
12+
indent_size = 4
13+
14+
# C++
15+
[*.{cpp,h,tcc}]
16+
indent_style = space
17+
indent_size = 2
18+
19+
# Web
20+
[*.{js,html,css}]
21+
indent_style = space
22+
indent_size = 2
23+
24+
# YAML
25+
[*.{yaml,yml}]
26+
indent_style = space
27+
indent_size = 2
28+
quote_type = double
29+
30+
# JSON
31+
[*.json]
32+
indent_style = space
33+
indent_size = 2

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
time: "06:00"
8+
timezone: "America/Los_Angeles"
9+
groups:
10+
github-actions:
11+
patterns:
12+
- "*"
13+
commit-message:
14+
prefix: "ci"
15+
include: "scope"

0 commit comments

Comments
 (0)