Skip to content

Commit 39e24a4

Browse files
committed
Merge branch 'develop'
2 parents 9098bdf + aa8f1e5 commit 39e24a4

39 files changed

+1349
-260
lines changed

.clang-format

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: LLVM
4+
AccessModifierOffset: -2
5+
AlignAfterOpenBracket: Align
6+
AlignArrayOfStructures: None
7+
AlignConsecutiveMacros:
8+
Enabled: true
9+
AcrossEmptyLines: true
10+
AcrossComments: true
11+
AlignConsecutiveAssignments: None
12+
AlignConsecutiveBitFields:
13+
Enabled: true
14+
AcrossEmptyLines: true
15+
AcrossComments: true
16+
AlignConsecutiveDeclarations: None
17+
AlignEscapedNewlines: Right
18+
AlignOperands: Align
19+
SortIncludes: false
20+
InsertBraces: true # Control statements must have curly brackets
21+
AlignTrailingComments: true
22+
AllowAllArgumentsOnNextLine: true
23+
AllowAllParametersOfDeclarationOnNextLine: true
24+
AllowShortEnumsOnASingleLine: true
25+
AllowShortBlocksOnASingleLine: Empty
26+
AllowShortCaseLabelsOnASingleLine: false
27+
AllowShortFunctionsOnASingleLine: All
28+
AllowShortLambdasOnASingleLine: All
29+
AllowShortIfStatementsOnASingleLine: Never
30+
AllowShortLoopsOnASingleLine: false
31+
AlwaysBreakAfterDefinitionReturnType: None
32+
AlwaysBreakAfterReturnType: AllDefinitions
33+
AlwaysBreakBeforeMultilineStrings: false
34+
AlwaysBreakTemplateDeclarations: Yes
35+
AttributeMacros:
36+
- __capability
37+
BinPackArguments: true
38+
BinPackParameters: true
39+
BraceWrapping:
40+
AfterCaseLabel: false
41+
AfterClass: false
42+
AfterControlStatement: Never
43+
AfterEnum: false
44+
AfterFunction: false
45+
AfterNamespace: false
46+
AfterObjCDeclaration: false
47+
AfterStruct: false
48+
AfterUnion: false
49+
AfterExternBlock: false
50+
BeforeCatch: false
51+
BeforeElse: false
52+
BeforeLambdaBody: false
53+
BeforeWhile: false
54+
IndentBraces: false
55+
SplitEmptyFunction: true
56+
SplitEmptyRecord: true
57+
SplitEmptyNamespace: true
58+
BreakBeforeBinaryOperators: NonAssignment
59+
BreakBeforeConceptDeclarations: true
60+
BreakBeforeBraces: Attach
61+
BreakBeforeInheritanceComma: false
62+
BreakInheritanceList: BeforeColon
63+
BreakBeforeTernaryOperators: true
64+
BreakConstructorInitializersBeforeComma: false
65+
BreakConstructorInitializers: BeforeColon
66+
BreakAfterJavaFieldAnnotations: false
67+
BreakStringLiterals: true
68+
ColumnLimit: 120
69+
CommentPragmas: "^ IWYU pragma:"
70+
QualifierAlignment: Leave
71+
CompactNamespaces: false
72+
ConstructorInitializerIndentWidth: 4
73+
ContinuationIndentWidth: 4
74+
Cpp11BracedListStyle: true
75+
DeriveLineEnding: true
76+
DerivePointerAlignment: false
77+
DisableFormat: false
78+
EmptyLineAfterAccessModifier: Never
79+
EmptyLineBeforeAccessModifier: LogicalBlock
80+
ExperimentalAutoDetectBinPacking: false
81+
PackConstructorInitializers: BinPack
82+
BasedOnStyle: ""
83+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
84+
AllowAllConstructorInitializersOnNextLine: true
85+
FixNamespaceComments: true
86+
ForEachMacros:
87+
- foreach
88+
- Q_FOREACH
89+
- BOOST_FOREACH
90+
IfMacros:
91+
- KJ_IF_MAYBE
92+
IncludeBlocks: Preserve
93+
IncludeCategories:
94+
- Regex: "^<(.*)>"
95+
Priority: 0
96+
- Regex: '^"(.*)"'
97+
Priority: 1
98+
- Regex: "(.*)"
99+
Priority: 2
100+
IncludeIsMainRegex: "(Test)?$"
101+
IncludeIsMainSourceRegex: ""
102+
IndentAccessModifiers: false
103+
IndentCaseLabels: true
104+
IndentCaseBlocks: false
105+
IndentGotoLabels: true
106+
IndentPPDirectives: None
107+
IndentExternBlock: AfterExternBlock
108+
IndentRequires: true
109+
IndentWidth: 4
110+
IndentWrappedFunctionNames: false
111+
InsertTrailingCommas: None
112+
JavaScriptQuotes: Leave
113+
JavaScriptWrapImports: true
114+
KeepEmptyLinesAtTheStartOfBlocks: true
115+
LambdaBodyIndentation: Signature
116+
MacroBlockBegin: ""
117+
MacroBlockEnd: ""
118+
MaxEmptyLinesToKeep: 1
119+
NamespaceIndentation: None
120+
ObjCBinPackProtocolList: Auto
121+
ObjCBlockIndentWidth: 2
122+
ObjCBreakBeforeNestedBlockParam: true
123+
ObjCSpaceAfterProperty: false
124+
ObjCSpaceBeforeProtocolList: true
125+
PenaltyBreakAssignment: 2
126+
PenaltyBreakBeforeFirstCallParameter: 19
127+
PenaltyBreakComment: 300
128+
PenaltyBreakFirstLessLess: 120
129+
PenaltyBreakOpenParenthesis: 0
130+
PenaltyBreakString: 1000
131+
PenaltyBreakTemplateDeclaration: 10
132+
PenaltyExcessCharacter: 1000000
133+
PenaltyReturnTypeOnItsOwnLine: 60
134+
PenaltyIndentedWhitespace: 0
135+
PointerAlignment: Left
136+
PPIndentWidth: -1
137+
ReferenceAlignment: Pointer
138+
ReflowComments: false
139+
RemoveBracesLLVM: false
140+
SeparateDefinitionBlocks: Always
141+
ShortNamespaceLines: 1
142+
SortJavaStaticImport: Before
143+
SortUsingDeclarations: true
144+
SpaceAfterCStyleCast: false
145+
SpaceAfterLogicalNot: false
146+
SpaceAfterTemplateKeyword: true
147+
SpaceBeforeAssignmentOperators: true
148+
SpaceBeforeCaseColon: false
149+
SpaceBeforeParens: ControlStatements
150+
SpaceBeforeParensOptions:
151+
AfterControlStatements: true
152+
AfterForeachMacros: true
153+
AfterFunctionDefinitionName: false
154+
AfterFunctionDeclarationName: false
155+
AfterIfMacros: true
156+
AfterOverloadedOperator: false
157+
BeforeNonEmptyParentheses: false
158+
SpaceAroundPointerQualifiers: Default
159+
SpaceBeforeRangeBasedForLoopColon: true
160+
SpaceInEmptyBlock: false
161+
SpaceInEmptyParentheses: false
162+
SpacesBeforeTrailingComments: 1
163+
SpacesInAngles: Never
164+
SpacesInConditionalStatement: false
165+
SpacesInContainerLiterals: true
166+
SpacesInCStyleCastParentheses: false
167+
SpacesInLineCommentPrefix:
168+
Minimum: 1
169+
Maximum: -1
170+
SpacesInParentheses: false
171+
SpacesInSquareBrackets: false
172+
SpaceBeforeSquareBrackets: false
173+
BitFieldColonSpacing: Both
174+
Standard: Latest
175+
StatementAttributeLikeMacros:
176+
- Q_EMIT
177+
StatementMacros:
178+
- Q_UNUSED
179+
- QT_REQUIRE_VERSION
180+
TabWidth: 8
181+
UseCRLF: false
182+
UseTab: Never
183+
WhitespaceSensitiveMacros:
184+
- STRINGIZE
185+
- PP_STRINGIZE
186+
- BOOST_PP_STRINGIZE
187+
- NS_SWIFT_NAME
188+
- CF_SWIFT_NAME
189+
SpaceBeforeCpp11BracedList: false
190+
SpaceBeforeCtorInitializerColon: true
191+
SpaceBeforeInheritanceColon: true
192+
---
193+

.vscode/c_cpp_properties.json

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
11
{
2+
"version": 4,
23
"configurations": [
34
{
5+
/*
6+
* Full configuration is provided by CMake plugin for vscode,
7+
* that shall be installed by user
8+
*/
49
"name": "Win32",
5-
"includePath": [
6-
"${workspaceFolder}\\dev\\",
7-
"${workspaceFolder}\\lwshell\\src\\include\\"
8-
],
9-
"defines": [
10-
"WIN32",
11-
"_DEBUG",
12-
"UNICODE",
13-
"_UNICODE"
14-
],
15-
"compilerPath": "c:\\msys64\\mingw64\\bin\\gcc.exe",
16-
"cStandard": "gnu17",
17-
"cppStandard": "gnu++14",
18-
"intelliSenseMode": "windows-gcc-x86",
10+
"intelliSenseMode": "${default}",
1911
"configurationProvider": "ms-vscode.cmake-tools"
2012
}
21-
],
22-
"version": 4
13+
]
2314
}

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"ms-vscode.cpptools",
4+
"ms-vscode.cmake-tools",
5+
"twxs.cmake",
6+
]
7+
}

.vscode/launch.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
52
"version": "0.2.0",
63
"configurations": [
74
{
5+
/* GDB must in be in the PATH environment */
86
"name": "(Windows) Launch",
97
"type": "cppdbg",
108
"request": "launch",
11-
"program": "${workspaceFolder}\\build\\LwLibPROJECT.exe",
12-
"miDebuggerPath": "c:\\msys64\\mingw64\\bin\\gdb.exe",
9+
"program": "${command:cmake.launchTargetPath}",
1310
"args": [],
1411
"stopAtEntry": false,
1512
"cwd": "${fileDirname}",
16-
"environment": [],
17-
"console": "integratedTerminal"
13+
"environment": []
1814
}
1915
]
2016
}

.vscode/settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"files.associations": {
3+
"lwevt_types.h": "c",
4+
"lwevt_type.h": "c",
5+
"lwevt.h": "c",
6+
"string.h": "c",
7+
"lwevt_opt.h": "c",
8+
"lwshell.h": "c",
9+
"lwshell_opt.h": "c",
10+
"lwshell_opts.h": "c",
11+
"typeinfo": "c"
12+
},
13+
"esbonio.sphinx.confDir": ""
14+
}

.vscode/tasks.json

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
{
22
"version": "2.0.0",
3-
4-
/* For this builds, you need
5-
*
6-
* - Ninja build system
7-
* - MSYS2 compiler with ninja support
8-
* - C/C++ extension for VSCode
9-
* - CMake-Tools extension for VSCode
10-
*/
113
"tasks": [
124
{
135
"type": "cppbuild",
146
"label": "Build project",
157
"command": "cmake",
16-
"args": ["--build", "\"build\""],
8+
"args": ["--build", "${command:cmake.buildDirectory}", "-j", "8"],
179
"options": {
1810
"cwd": "${workspaceFolder}"
1911
},
@@ -27,7 +19,7 @@
2719
"type": "shell",
2820
"label": "Re-build project",
2921
"command": "cmake",
30-
"args": ["--build", "\"build\"", "--clean-first", "-v"],
22+
"args": ["--build", "${command:cmake.buildDirectory}", "--clean-first", "-v", "-j", "8"],
3123
"options": {
3224
"cwd": "${workspaceFolder}"
3325
},
@@ -37,7 +29,7 @@
3729
"type": "shell",
3830
"label": "Clean project",
3931
"command": "cmake",
40-
"args": ["--build", "\"build\"", "--target", "clean"],
32+
"args": ["--build", "${command:cmake.buildDirectory}", "--target", "clean"],
4133
"options": {
4234
"cwd": "${workspaceFolder}"
4335
},
@@ -46,9 +38,36 @@
4638
{
4739
"type": "shell",
4840
"label": "Run application",
49-
"command": "${workspaceFolder}\\build\\LwLibPROJECT.exe",
41+
"command": "${command:cmake.launchTargetPath}",
5042
"args": [],
5143
"problemMatcher": [],
5244
},
45+
{
46+
"label": "Docs: Install python plugins from requirements.txt file",
47+
"type": "shell",
48+
"command": "python -m pip install -r requirements.txt",
49+
"options": {
50+
"cwd": "${workspaceFolder}/docs"
51+
},
52+
"problemMatcher": []
53+
},
54+
{
55+
"label": "Docs: Generate html",
56+
"type": "shell",
57+
"command": ".\\make html",
58+
"options": {
59+
"cwd": "${workspaceFolder}/docs"
60+
},
61+
"problemMatcher": []
62+
},
63+
{
64+
"label": "Docs: Clean build directory",
65+
"type": "shell",
66+
"command": ".\\make clean",
67+
"options": {
68+
"cwd": "${workspaceFolder}/docs"
69+
},
70+
"problemMatcher": []
71+
},
5372
]
5473
}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## Develop
44

5+
- Change license year to 2022
6+
- Update code style with astyle
7+
- Add `.clang-format` draft
8+
- Add option for statically allocated commands array (improvement for small devices w/ little memory)
9+
- Add option to disable dynamic commands allocation (default value)
10+
511
## v1.1.1
612

713
- Split CMakeLists.txt files between library and executable

0 commit comments

Comments
 (0)