Repository navigation
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
54 lines (42 loc) · 3.13 KB
/
Copy path.coderabbit.yaml
File metadata and controls
54 lines (42 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
language: "en"
reviews:
profile: "assertive"
auto_review:
enabled: true
drafts: true
path_filters:
- "!3rd_party/**"
- "Game/Resources_SoC_1.0006/gamedata/**"
- "ogsr_engine/**"
path_instructions:
- path: "Game/Resources_SoC_1.0006/gamedata/scripts/**"
instructions: |
These files are Lua (LuaJIT 2.x) script files for the engine game logic.
Review them as code, checking for common Lua performance issues, garbage collection allocations, global namespace pollution, and nil-pointer errors.
- path: "Game/Resources_SoC_1.0006/gamedata/shaders/**"
instructions: |
These files are HLSL (High-Level Shading Language, DirectX 11.2+) source code files for the engine.
Review them as code, checking for common GPU performance pitfalls, register mapping errors, or uniform/buffer mismatches.
instructions: |
This repository is a high-performance game engine fork utilizing C++26.
Strictly enforce the following standards and principles during your review:
1. Language Standard (C++26 Priority):
- Assume the codebase compiles with full C++26 support.
- Strongly encourage the use of modern C++23 and C++26 features where applicable (e.g., advanced constexpr, std::expected, monadic optional operations, views, and text formatting updates).
- If any older pattern can be modernized using C++23/26, explicitly point it out.
2. Toolchain & Hardening Environment (CRITICAL):
- The project is compiled and statically linked with a hardened libc++ using the "fast" hardening profile.
- All standard containers (like std::vector, std::string) and classes perform internal bounds checking, iterator validation, and basic nullptr checks by default, triggering a secure `__builtin_trap()` on violation.
- DO NOT flag or request manual defensive code checks (such as replacing `operator[]` with `.at()`, or adding explicit `if (ptr == nullptr)` validations before passing to std classes) unless it is vital for complex business logic. Assume the hardened standard library reliably guarantees boundaries and traps safely.
3. C++ Core Guidelines:
- Strictly enforce the C++ Core Guidelines (e.g., resource management, type safety).
- EXCEPTION: In the event of a conflict between older C++ Core Guidelines recommendations (like avoiding operator[]) and our modern C++23/C++26 hardened toolchain environment, always prefer the hardened C++23/C++26 approach.
4. Zero-Overhead Principle & Game Engine Performance:
- Every abstraction must follow the zero-overhead principle.
- Flag unnecessary heap allocations, cache-unfriendly data structures, and excessive dynamic dispatch (virtual calls) in performance-critical code paths.
- Watch out for redundant copies, lack of std::move where applicable, and pass-by-value of heavy objects.
5. Safety & Robustness:
- Look for core memory safety issues, undefined behavior, uninitialized variables, and race conditions that hardening cannot catch.
- Prioritize compile-time checks (static_assert, concepts) over runtime validation where possible.
chat:
auto_reply: true