Skip to content

Commit 70eeb39

Browse files
Initial commit
0 parents  commit 70eeb39

Some content is hidden

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

79 files changed

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