Skip to content

Commit c29e81c

Browse files
authored
Initial commit
0 parents  commit c29e81c

File tree

7 files changed

+464
-0
lines changed

7 files changed

+464
-0
lines changed

.clang-format

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
BasedOnStyle: Google
2+
AccessModifierOffset: -4
3+
AlignAfterOpenBracket: Align
4+
AlignConsecutiveMacros: true
5+
AlignConsecutiveAssignments: true
6+
AlignConsecutiveDeclarations: false
7+
AlignEscapedNewlines: Left
8+
AlignOperands: true
9+
AlignTrailingComments: true
10+
AllowAllArgumentsOnNextLine: true
11+
AllowAllConstructorInitializersOnNextLine: true
12+
AllowAllParametersOfDeclarationOnNextLine: true
13+
AllowShortBlocksOnASingleLine: Never
14+
AllowShortCaseLabelsOnASingleLine: false
15+
AllowShortFunctionsOnASingleLine: false
16+
AllowShortLambdasOnASingleLine: All
17+
AllowShortIfStatementsOnASingleLine: WithoutElse
18+
AllowShortLoopsOnASingleLine: true
19+
AlwaysBreakAfterDefinitionReturnType: None
20+
AlwaysBreakAfterReturnType: None
21+
AlwaysBreakBeforeMultilineStrings: true
22+
AlwaysBreakTemplateDeclarations: Yes
23+
BinPackArguments: true
24+
BinPackParameters: true
25+
BraceWrapping:
26+
AfterCaseLabel: false
27+
AfterClass: false
28+
AfterControlStatement: false
29+
AfterEnum: false
30+
AfterFunction: true
31+
AfterNamespace: false
32+
AfterObjCDeclaration: false
33+
AfterStruct: false
34+
AfterUnion: false
35+
AfterExternBlock: false
36+
BeforeCatch: false
37+
BeforeElse: false
38+
IndentBraces: false
39+
SplitEmptyFunction: true
40+
SplitEmptyRecord: true
41+
SplitEmptyNamespace: true
42+
BreakBeforeBinaryOperators: None
43+
BreakBeforeBraces: Custom
44+
BreakBeforeInheritanceComma: false
45+
BreakInheritanceList: BeforeColon
46+
BreakBeforeTernaryOperators: true
47+
BreakConstructorInitializersBeforeComma: false
48+
BreakConstructorInitializers: BeforeColon
49+
BreakAfterJavaFieldAnnotations: false
50+
BreakStringLiterals: true
51+
ColumnLimit: 120
52+
CommentPragmas: '^ IWYU pragma:'
53+
CompactNamespaces: false
54+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
55+
ConstructorInitializerIndentWidth: 4
56+
ContinuationIndentWidth: 4
57+
Cpp11BracedListStyle: true
58+
DeriveLineEnding: true
59+
DerivePointerAlignment: true
60+
DisableFormat: false
61+
ExperimentalAutoDetectBinPacking: false
62+
FixNamespaceComments: true
63+
ForEachMacros:
64+
- foreach
65+
- Q_FOREACH
66+
- BOOST_FOREACH
67+
IncludeBlocks: Regroup
68+
IncludeCategories:
69+
- Regex: '^<ext/.*\.h>'
70+
Priority: 2
71+
SortPriority: 0
72+
- Regex: '^<.*\.h>'
73+
Priority: 1
74+
SortPriority: 0
75+
- Regex: '^<.*'
76+
Priority: 2
77+
SortPriority: 0
78+
- Regex: '.*'
79+
Priority: 3
80+
SortPriority: 0
81+
IncludeIsMainRegex: '([-_](test|unittest))?$'
82+
IncludeIsMainSourceRegex: ''
83+
IndentCaseLabels: true
84+
IndentGotoLabels: true
85+
IndentPPDirectives: None
86+
IndentWidth: 4
87+
IndentWrappedFunctionNames: false
88+
JavaScriptQuotes: Leave
89+
JavaScriptWrapImports: true
90+
KeepEmptyLinesAtTheStartOfBlocks: false
91+
MacroBlockBegin: ''
92+
MacroBlockEnd: ''
93+
MaxEmptyLinesToKeep: 1
94+
NamespaceIndentation: None
95+
ObjCBinPackProtocolList: Never
96+
ObjCBlockIndentWidth: 2
97+
ObjCSpaceAfterProperty: false
98+
ObjCSpaceBeforeProtocolList: true
99+
PenaltyBreakAssignment: 2
100+
PenaltyBreakBeforeFirstCallParameter: 1
101+
PenaltyBreakComment: 300
102+
PenaltyBreakFirstLessLess: 120
103+
PenaltyBreakString: 1000
104+
PenaltyBreakTemplateDeclaration: 10
105+
PenaltyExcessCharacter: 1000000
106+
PenaltyReturnTypeOnItsOwnLine: 200
107+
PointerAlignment: Left
108+
RawStringFormats:
109+
- Language: Cpp
110+
Delimiters:
111+
- cc
112+
- CC
113+
- cpp
114+
- Cpp
115+
- CPP
116+
- 'c++'
117+
- 'C++'
118+
CanonicalDelimiter: ''
119+
BasedOnStyle: google
120+
- Language: TextProto
121+
Delimiters:
122+
- pb
123+
- PB
124+
- proto
125+
- PROTO
126+
EnclosingFunctions:
127+
- EqualsProto
128+
- EquivToProto
129+
- PARSE_PARTIAL_TEXT_PROTO
130+
- PARSE_TEST_PROTO
131+
- PARSE_TEXT_PROTO
132+
- ParseTextOrDie
133+
- ParseTextProtoOrDie
134+
CanonicalDelimiter: ''
135+
BasedOnStyle: google
136+
ReflowComments: true
137+
SortIncludes: false
138+
SortUsingDeclarations: true
139+
SpaceAfterCStyleCast: false
140+
SpaceAfterLogicalNot: false
141+
SpaceAfterTemplateKeyword: true
142+
SpaceBeforeAssignmentOperators: true
143+
SpaceBeforeCpp11BracedList: false
144+
SpaceBeforeCtorInitializerColon: true
145+
SpaceBeforeInheritanceColon: true
146+
SpaceBeforeParens: ControlStatements
147+
SpaceBeforeRangeBasedForLoopColon: true
148+
SpaceInEmptyBlock: false
149+
SpaceInEmptyParentheses: false
150+
SpacesBeforeTrailingComments: 2
151+
SpacesInAngles: false
152+
SpacesInConditionalStatement: false
153+
SpacesInContainerLiterals: true
154+
SpacesInCStyleCastParentheses: false
155+
SpacesInParentheses: false
156+
SpacesInSquareBrackets: false
157+
SpaceBeforeSquareBrackets: false
158+
Standard: Auto
159+
StatementMacros:
160+
- Q_UNUSED
161+
- QT_REQUIRE_VERSION
162+
TabWidth: 4
163+
UseCRLF: false
164+
UseTab: Never
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Source:
2+
# https://github.com/Tinyu-Zhao/M5-Depends/blob/main/.github/ISSUE_TEMPLATE/bug-report.yml
3+
# See:
4+
# https://docs.github.com/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
5+
6+
name: Bug report
7+
description: Report a problem with the code in this repository.
8+
labels:
9+
- "type: bug"
10+
body:
11+
- type: markdown
12+
attributes:
13+
value: "Thank you for opening an issue on an M5Stack Arduino library repository.\n\
14+
To improve the speed of resolution please review the following guidelines and common troubleshooting steps below before creating the issue:\n\
15+
If you have any UIFLOW questions you can ask in the [special board](https://community.m5stack.com/category/5/uiflow), there will be many enthusiastic friends to help you.\n\
16+
Do not use GitHub issues for troubleshooting projects and issues. Instead use the forums at https://community.m5stack.com to ask questions and troubleshoot why something isn't working as expected. In many cases the problem is a common issue that you will more quickly receive help from the forum community. GitHub issues are meant for known defects in the code. If you don't know if there is a defect in the code then start with troubleshooting on the forum first."
17+
- type: textarea
18+
id: description
19+
attributes:
20+
label: Describe the bug
21+
description: A clear and concise description of what the bug is.
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: reproduce
26+
attributes:
27+
label: To reproduce
28+
description: Provide the specific set of steps we can follow to reproduce the problem.
29+
placeholder: |
30+
1. In this environment...
31+
2. With this config...
32+
3. Run '...'
33+
4. See error...
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: expected
38+
attributes:
39+
label: Expected behavior
40+
description: What would you expect to happen after following those instructions?
41+
validations:
42+
required: true
43+
- type: textarea
44+
id: screenshots
45+
attributes:
46+
label: Screenshots
47+
description: If applicable, add screenshots to help explain your problem.
48+
validations:
49+
required: false
50+
- type: textarea
51+
id: information
52+
attributes:
53+
label: Environment
54+
description: |
55+
If applicable, add screenshots to help explain your problem.
56+
examples:
57+
- **OS**: Ubuntu 20.04
58+
- **IDE & IDE Version**: Arduino 1.8.19 Or Platform IO v2.5.0
59+
- **Repository Version**: 0.4.0
60+
value: |
61+
- OS:
62+
- IDE &IDE Version:
63+
- Repository Version:
64+
validations:
65+
required: false
66+
- type: textarea
67+
id: additional
68+
attributes:
69+
label: Additional context
70+
description: Add any additional information here.
71+
validations:
72+
required: false
73+
- type: checkboxes
74+
id: checklist
75+
attributes:
76+
label: Issue checklist
77+
description: Please double-check that you have done each of the following things before submitting the issue.
78+
options:
79+
- label: I searched for previous reports in [the issue tracker](https://github.com/m5stack/M5Stack/issues?q=)
80+
required: true
81+
- label: My report contains all necessary details
82+
required: true
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Arduino Lint Check
2+
on:
3+
push:
4+
branches: [ master, main ]
5+
pull_request:
6+
branches: [ master, main ]
7+
workflow_dispatch:
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
lint:
19+
name: Lint Check
20+
runs-on: [self-hosted, Linux, X64]
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: arduino/arduino-lint-action@v2
24+
with:
25+
library-manager: update
26+
compliance: strict
27+
project-type: all
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: clang-format Check
2+
3+
env:
4+
INCLUDE_REGEX: ^.*\.((((c|C)(c|pp|xx|\+\+)?$)|((h|H)h?(pp|xx|\+\+)?$))|(inl|ino|pde|proto|cu))$
5+
6+
on:
7+
push:
8+
tags-ignore:
9+
- '*.*.*'
10+
- 'v*.*.*'
11+
branches:
12+
- '*'
13+
paths:
14+
- '*'
15+
- '**.ino'
16+
- '**.cpp'
17+
- '**.hpp'
18+
- '**.h'
19+
- '**.c'
20+
- '**.inl'
21+
- '**clang-format-check.yml'
22+
- '**.clang-format'
23+
pull_request:
24+
paths:
25+
- '**.ino'
26+
- '**.cpp'
27+
- '**.hpp'
28+
- '**.h'
29+
- '**.c'
30+
- '**.inl'
31+
- '**clang-format-check.yml'
32+
- '**.clang-format'
33+
workflow_dispatch:
34+
35+
jobs:
36+
formatting-check:
37+
name: Formatting Check
38+
runs-on: [self-hosted, Linux, X64]
39+
strategy:
40+
matrix:
41+
path:
42+
- check: './' # path to include
43+
exclude: '' # path to exclude
44+
#- check: 'src'
45+
# exclude: '(Fonts)' # Exclude file paths containing "Fonts"
46+
#- check: 'examples'
47+
# exclude: ''
48+
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v4
52+
with:
53+
ref: ${{ github.event.pull_request.head.sha }}
54+
55+
- name: Run clang-format style check for C/C++/Protobuf programs.
56+
uses: jidicula/[email protected] # Using include-regex 10.x or later
57+
with:
58+
clang-format-version: '13'
59+
check-path: ${{ matrix.path['check'] }}
60+
exclude-regex: ${{ matrix.path['exclude'] }}
61+
include-regex: ${{ env.INCLUDE_REGEX }}

.gitignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app
33+
34+
# MacOS desktop metadata files
35+
.DS_Store
36+
37+
# Build files
38+
build/
39+
cmake-build-*/
40+
managed_components/
41+
42+
# PlatformIO
43+
.pio/
44+
45+
# VSCode
46+
.vscode/
47+
.cache/
48+
49+
# Python virtual environment
50+
.venv/
51+
52+
# Debug / Release files
53+
Debug/
54+
debug/
55+
Release/
56+
release/
57+
out/
58+
bin/
59+
obj/
60+
61+
*.code-workspace

0 commit comments

Comments
 (0)