-
Notifications
You must be signed in to change notification settings - Fork 5
chore: add CodeRabbit config #365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| knowledge_base: | ||
| mcp: | ||
| # "auto" disables MCP for public repositories, so set it explicitly. | ||
| # This is what allows the DeepWiki MCP server to be used as review context. | ||
| usage: enabled | ||
|
|
||
| reviews: | ||
| path_instructions: | ||
| - path: "src/main/java/**/*.java" | ||
| instructions: | | ||
| Minecraft 1.12.2 Forge mod (GTExpert-Core), an add-on for | ||
| GregTech CE: Unofficial (GTCEu, https://github.com/GregTechCEu/GregTech). | ||
| Hard dependency: `gregtech:gregtech:2.8.10-beta`. | ||
|
|
||
| GTCEu context — use DeepWiki (GregTechCEu/GregTech) to verify: | ||
| - Confirm GTCEu APIs, registries and helper classes are used correctly, and that | ||
| referenced methods/fields actually exist in the pinned GTCEu version. | ||
| - Flag use of GTCEu internals that are not part of its public API when a public | ||
| equivalent exists. | ||
| - Recipe registration, material/OrePrefix usage and MetaTileEntity registration | ||
| must follow GTCEu conventions. Check ID collisions where relevant. | ||
|
|
||
| Platform constraints (1.12.2 / Java 8 bytecode): | ||
| - Do NOT suggest Java APIs or language features unavailable on this platform | ||
| (e.g. `List.of`, `var` in this codebase, records, switch expressions, text blocks). | ||
| - Do NOT suggest modern Minecraft/Forge APIs; this is the 1.12.2 Forge line. | ||
|
|
||
| Side boundary: | ||
| - Flag client-only types or `@SideOnly(Side.CLIENT)` members referenced from | ||
| common/server code paths — this crashes a dedicated server. | ||
|
|
||
| Mixins (`core/mixins/`, configs `mixins.gtexpert.*.json`): | ||
| - Verify the target class, method signature and descriptor plausibly exist in the | ||
| targeted mod (gregtech, gcym, draconicevolution, draconicadditions). | ||
| - Injection points must be specific enough not to break on minor upstream changes. | ||
| - Any new mixin must be registered in the matching `mixins.gtexpert.*.json`. | ||
|
|
||
| ASM class transformers (`core/GTECoreMod.java` as `IFMLLoadingPlugin`, | ||
| `getASMTransformerClass()`, and `IClassTransformer` implementations such as | ||
| `NAE2PatchTransformer`): | ||
| - These patch bytecode directly (ASM tree API), with no compile-time check against | ||
| the target class — a wrong field/method name or descriptor fails silently or | ||
| crashes at class-load time instead of at compile time. Review changes here with | ||
| extra scrutiny. | ||
| - Confirm the transformer only touches the intended target class name and that any | ||
| new transformer is registered in `getASMTransformerClass()`. | ||
| - Flag any transformer logic that assumes a target field/method exists without a | ||
| null/absence check, since upstream mods can rename or remove members between | ||
| versions (this is literally why `NAE2PatchTransformer` exists). | ||
|
|
||
| Integration modules (`integration/`, `modules/`): | ||
| - Optional mod integrations must be gated (`Loader.isModLoaded()` or the module | ||
| system's `modDependencies`) so a missing optional mod cannot crash the game. | ||
|
|
||
| Build: | ||
| - `build.gradle` is auto-generated. Never edit it | ||
| (configure via `buildscript.properties` / `dependencies.gradle`). | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: GTModpackTeam/GTExpert-Core
Length of output: 4434
🌐 Web query:
CodeRabbit path_instructions configuration whether instructions apply only to files matched by path glob💡 Result:
Yes, CodeRabbit path_instructions apply exclusively to files that match the specified path glob pattern [1][2][3]. When you define path_instructions in your.coderabbit.yaml configuration, CodeRabbit evaluates the files changed in a pull request against these glob patterns [2][3]. The associated instructions are then applied only to the files that match those patterns [1][3]. Key details regarding this behavior include: - Targeted Guidance: These instructions supplement your global review instructions [2][3]. If a file matches a path pattern, it receives both the global instructions and the specific path-based instructions [3]. - Multiple Matches: If a file matches multiple path glob patterns, it will receive the instructions from all applicable patterns [3]. - Not a Replacement: Path instructions are intended as a targeted supplement to CodeRabbit's built-in review logic, not a replacement for it [1]. - Configuration: You can configure these in your repository's.coderabbit.yaml file under the reviews.path_instructions key, using an array of objects that each contain a path and its associated instructions [1][2].
Citations:
Add matching path entries for non-Java checks.
The
src/main/java/**/*.javaentry does not apply tosrc/main/resources/mixins.gtexpert.*.jsonorbuild.gradle. Move their checks into dedicated path entries so CodeRabbit applies them when those files change.🤖 Prompt for AI Agents