Skip to content

Commit 0d2d049

Browse files
committed
feat: add FunctionContainer, Log and tools
1 parent 782f3e0 commit 0d2d049

39 files changed

Lines changed: 4883 additions & 1 deletion

.clang-format

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

.gitattributes

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Line endings
2+
* text=auto eol=lf
3+
4+
# Binary files
5+
*.jpg binary
6+
*.png binary
7+
*.gif binary
8+
*.mp4 binary
9+
*.mp3 binary
10+
*.pdf binary
11+
*.zip binary
12+
*.ico binary
13+
*.xpm binary
14+
*.icns binary
15+
*.obj binary
16+
*.o binary
17+
*.a binary
18+
*.lib binary
19+
*.dll binary
20+
*.so binary
21+
*.dylib binary
22+
*.exe binary
23+
*.out binary
24+
*.app binary
25+
26+
# Handling of C-specific and C++-specific files
27+
*.c linguist-language=C
28+
*.h linguist-language=C
29+
*.cpp linguist-language=C++
30+
*.inl linguist-language=C++
31+
*.hpp linguist-language=C++
32+
*.lua linguist-language=Lua
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
A clear and concise description of what the bug is.
11+
12+
## Steps to Reproduce
13+
Steps to reproduce the behavior:
14+
1. Go to '...'
15+
2. Click on '...'
16+
3. Scroll down to '...'
17+
4. See error
18+
19+
## Expected Behavior
20+
A clear and concise description of what you expected to happen.
21+
22+
## Actual Behavior
23+
A clear and concise description of what actually happened.
24+
25+
## Environment
26+
- OS: [e.g. Windows 10, Ubuntu 22.04, macOS 13]
27+
- Compiler: [e.g. MSVC 2022, GCC 11.2, Clang 15]
28+
- Vulkan SDK Version: [e.g. 1.3.268.0]
29+
- Engine² Version/Commit: [e.g. v1.0.0 or commit hash]
30+
31+
## Additional Context
32+
Add any other context about the problem here. Include:
33+
- Error messages or stack traces
34+
- Screenshots or videos if applicable
35+
- Related issues or PRs
36+
- Possible solutions you've considered
37+
38+
## Code Sample (if applicable)
39+
```cpp
40+
// Minimal code snippet that demonstrates the issue
41+
```
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Problem Statement
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
## Proposed Solution
13+
A clear and concise description of what you want to happen.
14+
15+
## Alternative Solutions
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
## Use Cases
19+
Describe how this feature would be used and who would benefit from it:
20+
- Use case 1: ...
21+
- Use case 2: ...
22+
23+
## Impact
24+
Describe the potential impact of this feature:
25+
- Performance implications
26+
- API changes
27+
- Breaking changes (if any)
28+
29+
## Implementation Details (optional)
30+
If you have ideas on how this could be implemented, please share them here.
31+
32+
## Additional Context
33+
Add any other context, screenshots, mockups, or examples about the feature request here.
34+
35+
## Related Issues
36+
List any related issues or PRs:
37+
- #issue_number

.github/ISSUE_TEMPLATE/question.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Question
3+
about: Ask a question about the project
4+
title: '[QUESTION] '
5+
labels: question
6+
assignees: ''
7+
---
8+
9+
## Question
10+
A clear and concise question about Engine².
11+
12+
## Context
13+
Provide context about what you're trying to achieve:
14+
- What are you working on?
15+
- What have you already tried?
16+
- What documentation have you consulted?
17+
18+
## Environment (if relevant)
19+
- OS: [e.g. Windows 10, Ubuntu 22.04, macOS 13]
20+
- Engine² Version/Commit: [e.g. v1.0.0 or commit hash]
21+
22+
## Additional Information
23+
Add any other information, code samples, or references that might help answer your question.
24+
25+
## Related Documentation
26+
If you've checked the documentation, please link to the relevant pages:
27+
- [Documentation link]

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Pull Request
2+
3+
## Description
4+
A clear and concise description of what this PR does and why it's needed.
5+
6+
## Related Issues
7+
Fixes #(issue)
8+
Relates to #(issue)
9+
10+
## Type of Change
11+
Please delete options that are not relevant.
12+
13+
- [ ] Bug fix (non-breaking change which fixes an issue)
14+
- [ ] New feature (non-breaking change which adds functionality)
15+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
16+
- [ ] Documentation update
17+
- [ ] Performance improvement
18+
- [ ] Code refactoring
19+
- [ ] Build/CI configuration change
20+
21+
## Changes Made
22+
List the main changes in this PR:
23+
- Change 1
24+
- Change 2
25+
- Change 3
26+
27+
## Testing
28+
Describe the tests you ran to verify your changes:
29+
- [ ] Unit tests pass (`xmake test`)
30+
- [ ] Code follows the project's style guidelines (`clang-format`)
31+
- [ ] Manual testing performed (describe what you tested)
32+
33+
### Test Environment
34+
- OS: [e.g. Windows 10, Ubuntu 22.04, macOS 13]
35+
- Compiler: [e.g. MSVC 2022, GCC 11.2, Clang 15]
36+
- Vulkan SDK Version: [e.g. 1.3.268.0]
37+
38+
## Screenshots/Videos (if applicable)
39+
Add screenshots or videos to help explain your changes.
40+
41+
## Documentation
42+
- [ ] I have updated the relevant documentation
43+
- [ ] I have added/updated comments in the code
44+
- [ ] No documentation changes are required
45+
46+
## Checklist
47+
- [ ] My code follows the style guidelines of this project
48+
- [ ] I have performed a self-review of my own code
49+
- [ ] I have commented my code, particularly in hard-to-understand areas
50+
- [ ] My changes generate no new warnings
51+
- [ ] I have added tests that prove my fix is effective or that my feature works
52+
- [ ] New and existing unit tests pass locally with my changes
53+
- [ ] Any dependent changes have been merged and published
54+
55+
## Breaking Changes
56+
If this PR introduces breaking changes, describe them here and provide migration instructions.
57+
58+
## Additional Notes
59+
Any additional information that reviewers should know.

0 commit comments

Comments
 (0)