Cubed-Development / Modern-Warfare-Cubed

Welcome to the official GitHub Repository for Modern Warfare Cubed!
Apache License 2.0
91 stars 59 forks source link

Updates to bullet display HUD #401

Closed Paneedah closed 4 months ago

Paneedah commented 5 months ago

📝 Description

This PR is all about the Ammo HUD and the bottom-right ammo counter display, improvements and small bug fixes.

🎯 Goals

❌ Non Goals

It is not a goal to update old methods and try to do stupid shit to them to get them to work.

It is not a goal to update anything that isn't simply visual / in the HUD.

🚦 Testing

This has been tested within and outside of dev-env. Tested all HUD related items such as open door, combinations of magazines and guns, and more.

⏮️ Backwards Compatibility

Perfectly backwards compatible and won't break anything. Old method has been marked as @Deprecated and should be removed in the near future.

📚 Related Issues & Documents

N/A

🖼️ Screenshots/Recordings

Original Display:

image

New:

image image image

📖 Added to documentation?

Summary by CodeRabbit

coderabbitai[bot] commented 5 months ago

Walkthrough

In the latest update for Modern Warfare Cubed Version 0.2, the focus is on enhancing user experience through interface improvements and player interactions. Changes include context-aware prompts for fire mode switching, a more detailed display of magazine bullet counts, and adjustments to the crosshair for improved visibility and usability. These refinements aim to make the game more intuitive and engaging, enhancing the overall gameplay experience.

Changes

File Change Summary
Changelog.md Conditional display of fire mode change prompt, improved magazine bullet count display, and crosshair visibility adjustments.
src/main/java/com/paneedah/weaponlib/CustomGui.java - Added import statement for net.minecraft.item.Item.
- Refactored event type comparisons for clarity.
- Removed handleModificationHUD method and related logic.
- Deprecated handleAmmoCounter in favor of drawAmmoCounter.
- Updated logic in onRenderCrosshair method for item-specific handling.
- Refactored drawAmmoCounter method for improved functionality and readability.

Recent Review Details **Configuration used: CodeRabbit UI**
Commits Files that changed from the base of the PR and between 7b20c411340efc950f76768fd7c0771acbb2e0ad and 23d474327c63ec0155fb0f4352b6ee772c20d561.
Files selected for processing (1) * Changelog.md (1 hunks)
Additional Context Used
LanguageTool (132)
Changelog.md (132)
Near line 5: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ... in this file. The format is based on [Keep a Changelog](https://keepachangelog.com... --- Near line 22: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case. Context: ...arning about the grenade exploding in X amount of seconds ### Internal - Made client... --- Near line 34: Possible spelling mistake found. Context: ...ore/files/all) [**MWC 0.1 NOW REQUIRES MIXINBOOTER**](https://www.curseforge.com/minecraft... --- Near line 36: Did you mean “TO back up”? Context: ... **BEFORE UPDATING TO MWC 0.1 MAKE SURE TO BACKUP YOUR WORLDS, THINGS WILL DISAPPEAR** #... --- Near line 40: Possible spelling mistake found. Context: ...GS WILL DISAPPEAR** ### Fixed - Fixed sideness checks missing causing crashes on dedic... --- Near line 41: Possible spelling mistake found. Context: ...ated servers - Fixed compatibility with GroovyScript above version 0.8 ## Modern Warfare Cu... --- Near line 49: Possible spelling mistake found. Context: ...ore/files/all) [**MWC 0.1 NOW REQUIRES MIXINBOOTER**](https://www.curseforge.com/minecraft... --- Near line 51: Did you mean “TO back up”? Context: ... **BEFORE UPDATING TO MWC 0.1 MAKE SURE TO BACKUP YOUR WORLDS, THINGS WILL DISAPPEAR** #... --- Near line 60: Possible spelling mistake found. Context: ...l scopes - Fixed compatibility with bad bukkit implementation (Bukkit should still fix... --- Near line 60: Possible spelling mistake found. Context: ...ibility with bad bukkit implementation (Bukkit should still fix that, if anyone is rea... --- Near line 61: Possible spelling mistake found. Context: ...hat, if anyone is reading that) - Fixed fov not being reset while reloading when ad... --- Near line 66: Possible spelling mistake found. Context: ...pons with stupid amounts of bullets - **GroovyScript integration:** - Fixed rare crashes w... --- Near line 70: Possible spelling mistake found. Context: ...n certain conditions - Fixed crash with Techguns when rendering weapons in certain condi... --- Near line 84: Possible spelling mistake found. Context: ...ore/files/all) [**MWC 0.1 NOW REQUIRES MIXINBOOTER**](https://www.curseforge.com/minecraft... --- Near line 86: Did you mean “TO back up”? Context: ... **BEFORE UPDATING TO MWC 0.1 MAKE SURE TO BACKUP YOUR WORLDS, THINGS WILL DISAPPEAR** #... --- Near line 98: Possible spelling mistake found. Context: ...ore/files/all) [**MWC 0.1 NOW REQUIRES MIXINBOOTER**](https://www.curseforge.com/minecraft... --- Near line 100: Did you mean “TO back up”? Context: ... **BEFORE UPDATING TO MWC 0.1 MAKE SURE TO BACKUP YOUR WORLDS, THINGS WILL DISAPPEAR** #... --- Near line 104: Possible spelling mistake found. Context: ...nditions (e.g., shooting an entity from Scape and Run: Parasites or shooting with cer... --- Near line 114: Possible spelling mistake found. Context: ...ore/files/all) [**MWC 0.1 NOW REQUIRES MIXINBOOTER**](https://www.curseforge.com/minecraft... --- Near line 116: Did you mean “TO back up”? Context: ... **BEFORE UPDATING TO MWC 0.1 MAKE SURE TO BACKUP YOUR WORLDS, THINGS WILL DISAPPEAR** #... --- Near line 129: Possible spelling mistake found. Context: ...ore/files/all) [**MWC 0.1 NOW REQUIRES MIXINBOOTER**](https://www.curseforge.com/minecraft... --- Near line 131: Did you mean “TO back up”? Context: ... **BEFORE UPDATING TO MWC 0.1 MAKE SURE TO BACKUP YOUR WORLDS, THINGS WILL DISAPPEAR** #... --- Near line 137: Possible spelling mistake found. Context: ...ki/Custom-Skins)) - Config options: - penetratesGlass - explosionBreak - penetrableBlocks... --- Near line 138: Possible spelling mistake found. Context: ...Config options: - penetratesGlass - explosionBreak - penetrableBlocks - hipFireSpread ... --- Near line 139: Possible spelling mistake found. Context: ... penetratesGlass - explosionBreak - penetrableBlocks - hipFireSpread - ammoCounterX -... --- Near line 140: Possible spelling mistake found. Context: ...explosionBreak - penetrableBlocks - hipFireSpread - ammoCounterX - ammoCounterY - ... --- Near line 141: Possible spelling mistake found. Context: ... penetrableBlocks - hipFireSpread - ammoCounterX - ammoCounterY - ammoCounterSize ... --- Near line 142: Possible spelling mistake found. Context: ... - hipFireSpread - ammoCounterX - ammoCounterY - ammoCounterSize - ammoCounterBack... --- Near line 143: Possible spelling mistake found. Context: ... - ammoCounterX - ammoCounterY - ammoCounterSize - ammoCounterBackgroundReverse - New ... --- Near line 144: Possible spelling mistake found. Context: ... - ammoCounterY - ammoCounterSize - ammoCounterBackgroundReverse - New BalancePackage Configuration: (Yo... --- Near line 145: Possible spelling mistake found. Context: ... - ammoCounterBackgroundReverse - New BalancePackage Configuration: (You need to regenerate ... --- Near line 147: Possible spelling mistake found. Context: ...and modify it again) - inaccuracy - hipFireSpread - hipFireSpreadMultiplier - Durabilit... --- Near line 148: Possible spelling mistake found. Context: ...n) - inaccuracy - hipFireSpread - hipFireSpreadMultiplier - Durability to all vests as a temporar... --- Near line 158: Possible spelling mistake found. Context: ...anguages - GitHub URL in `MCmod.info` - Proning in single player mode (**Note: Currentl... --- Near line 158: Possible spelling mistake found. Context: ...n single player mode (**Note: Currently unanimated; player will appear standing, will be r... --- Near line 163: Possible spelling mistake found. Context: ...n` - Added the .277 FURY bullet for the NGSW-R - Browning Auto 5 now ejects shotgun sh... --- Near line 165: Possible spelling mistake found. Context: ...to 5 now ejects shotgun shells - Added `reconcileAmmunition` & `reconcileAttachments` gamerules, th... --- Near line 165: Possible spelling mistake found. Context: ...shells - Added `reconcileAmmunition` & `reconcileAttachments` gamerules, they are true by default an... --- Near line 165: Possible spelling mistake found. Context: ...ileAmmunition` & `reconcileAttachments` gamerules, they are true by default and should on... --- Near line 165: Possible spelling mistake found. Context: ..., when you have weapons that appear to "desync" / glitch out - Added small delay to in... --- Near line 169: Possible spelling mistake found. Context: ... Added Hardness values to props - Added GroovyScript support plugin for workbench and ammo p... --- Near line 176: Possible spelling mistake found. Context: ...mo skin - Overhauled the texture of the Leupold Scope, EOTech Holographic A65 Sight, Ai... --- Near line 176: Possible spelling mistake found. Context: ...auled the texture of the Leupold Scope, EOTech Holographic A65 Sight, Aim Point Comp M... --- Near line 176: Possible spelling mistake found. Context: ..., Aim Point Comp M5 Sight, OKP-7 Sight, Bijia Reflex Sight, RMR Sight, OKP-7 Sight, a... --- Near line 176: Possible spelling mistake found. Context: ...flex Sight, RMR Sight, OKP-7 Sight, and Eotech Hybrid HHS™ II Sight - Overhauled anima... --- Near line 182: Possible spelling mistake found. Context: ...configs have been resolved - Adjusted `craftingmappings.json` to now only override recipes rath... --- Near line 190: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...RPG7 rockets to 4 and 2, respectively - Increased magazine capacity of bandits on Hard di... --- Near line 191: As a shorter alternative for ‘able to’, consider using “can now”. Context: ...of bandits on Hard difficulty - Bullets are now able to penetrate: - Standing signs - Stand... --- Near line 204: Possible spelling mistake found. Context: ...WarfareCubed.cfg) - Forge configuration `Emissive Item Rendering` is now forced to be off... --- Near line 204: Possible spelling mistake found. Context: ...rced to be off (This does not influence Optifine emissive item rendering) - OptiFine con... --- Near line 204: Possible spelling mistake found. Context: ...e off (This does not influence Optifine emissive item rendering) - OptiFine configuratio... --- Near line 205: Possible spelling mistake found. Context: ...nce Optifine emissive item rendering) - OptiFine configuration `Fast Render` is now forc... --- Near line 206: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...`Fast Render` is now forced to be off - Changed categories of some weapons - Magazines ... --- Near line 208: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...weapons - Magazines are created empty - Shells life go increased 1606% no performance ... --- Near line 208: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”? Context: ... performance impact in extreme cases // Todo: This is not supposed to be percent iir... --- Near line 208: Possible spelling mistake found. Context: ...odo: This is not supposed to be percent iirc - Luna Lage (Desoroxxx) 2023-12-22 - Th... --- Near line 208: Possible spelling mistake found. Context: ... not supposed to be percent iirc - Luna Lage (Desoroxxx) 2023-12-22 - The position o... --- Near line 208: Possible spelling mistake found. Context: ...upposed to be percent iirc - Luna Lage (Desoroxxx) 2023-12-22 - The position of the bulle... --- Near line 212: Possible spelling mistake found. Context: ...millisecond precision - Changed default `filmGrain` config from `0.025` to `0.03` - Change... --- Near line 213: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...mGrain` config from `0.025` to `0.03` - Changed default `onScreenRainAndSnow` config fr... --- Near line 213: Possible spelling mistake found. Context: ...rom `0.025` to `0.03` - Changed default `onScreenRainAndSnow` config from `false` to `true` - Change... --- Near line 214: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...ndSnow` config from `false` to `true` - Changed default `enableFancyRainAndSnow` config... --- Near line 214: Possible spelling mistake found. Context: ...rom `false` to `true` - Changed default `enableFancyRainAndSnow` config from `false` to `true` - Change... --- Near line 215: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...ndSnow` config from `false` to `true` - Changed base fog density from `0.6` to `0.2` - ... --- Near line 216: Did you mean “who”? Context: ...at the kill message will say who killed whom - Renamed `Armor` creative tab to `Equi... --- Near line 218: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...d `Armor` creative tab to `Equipment` - Renamed `Ammunition` creative tab to `Ammunitio... --- Near line 219: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...ative tab to `Ammunition & Magazines` - Renamed `Grenades` creative tab to `Throwables`... --- Near line 220: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...renades` creative tab to `Throwables` - Renamed `MWC Camera` and `MWC Tablet` to `Camer... --- Near line 223: Possible spelling mistake found. Context: ...bug commands are now only accessible to oped players (Oped of level 4) - Rewritten t... --- Near line 223: Possible spelling mistake found. Context: ...re now only accessible to oped players (Oped of level 4) - Rewritten the rendering s... --- Near line 227: Possible spelling mistake found. Context: ...orist spawns are now lower by default - Flashbangs do not flash trough walls anymore - Mov... --- Near line 228: Possible spelling mistake found. Context: ...pe registration from server starting to Registryevent ### Fixed - Fixed modifying... --- Near line 241: Possible spelling mistake found. Context: ... being able to penetrate: - Glass - Glowstone - Stacked wooden slabs (2 wooden slab... --- Near line 245: Consider using a different verb for a more formal wording. Context: ...non-terrorist mobs spawning with guns - Fixed the issue of mobs not naturally spawnin... --- Near line 246: Possible spelling mistake found. Context: ...enabled - Fixed several faults in en-US.lang - Fixed crashes caused by certain shade... --- Near line 249: Consider using a different verb for a more formal wording. Context: ...elated to copper, gunpowder, and ammo - Fixed a problem where the carryable inventory... --- Near line 253: Possible spelling mistake found. Context: ...overing weapons such as the MP7, CZ-805 Bren, and Python and Taurus revolvers - Fi... --- Near line 255: Possible typo: you repeated a word Context: ... the terminator conversion kit has been fixed - Fixed the attachment of the Long Deagle - F... --- Near line 256: Possible spelling mistake found. Context: ...ed - Fixed the attachment of the Long Deagle - Fixed m16 stock and m38 front sight... --- Near line 258: Possible spelling mistake found. Context: ...visual bugs with grips on the m40a6 and Malyuk - Fixed visual bugs with sight on the... --- Near line 267: Possible spelling mistake found. Context: ...ecoil on m17 - Fixed muzzle flash for Dragunov, F2000 and AK-101 - Fixed texture bul... --- Near line 269: Possible spelling mistake found. Context: ...llet - Fixed the attachment of the Long Deagle - Fixed prop hitboxes not lining up wit... --- Near line 270: Possible spelling mistake found. Context: ...achment of the Long Deagle - Fixed prop hitboxes not lining up with their models: - Fr... --- Near line 281: This phrase is duplicated. You should probably use “Desk Shelf” only once. Context: ...er Rack Top (left/right) - Laptop - Desk Shelf - Desk Shelf (Alt2) - Impaled Body - Hanging Bod... --- Near line 285: This phrase is duplicated. You should probably use “Office Chair” only once. Context: ...) - Impaled Body - Hanging Body - Office Chair - Office Chair 2 - Home Chair - White Desk Middle ... --- Near line 291: Possible spelling mistake found. Context: ...tated - Fixed unused variable in shader `postflat.frag` causing a crash - Fixed `20rnd 6.... --- Near line 294: Possible spelling mistake found. Context: ...ecraft missing texture - Fixed multiple `ResourceLocation` in the `PostProcessPipeline` being in... --- Near line 294: Possible typo: you repeated a whitespace Context: ...ture - Fixed multiple `ResourceLocation` in the `PostProcessPipeline` being incor... --- Near line 294: Possible spelling mistake found. Context: ...xed multiple `ResourceLocation` in the `PostProcessPipeline` being incorrect leading to missing tex... --- Near line 296: This word is normally spelled with a hyphen. Context: ...pth testing being disabled in the world post processing causing issue with first person hand re... --- Near line 297: Possible spelling mistake found. Context: ...ndering - Fixed the issue where fog was hardcoded to be disabled - Fixed world post proce... --- Near line 298: This word is normally spelled with a hyphen. Context: ... hardcoded to be disabled - Fixed world post processing never rendering due to bandage fix - Fi... --- Near line 299: This word is normally spelled with a hyphen. Context: ...dering due to bandage fix - Fixed world post processing causing a white screen - Fixed `onScree... --- Near line 300: Possible spelling mistake found. Context: ...ocessing causing a white screen - Fixed `onScreenRainAndSnow` missing lang entries - Fixed `enableFa... --- Near line 300: Possible spelling mistake found. Context: ...n - Fixed `onScreenRainAndSnow` missing lang entries - Fixed `enableFancyRainAndSnow... --- Near line 301: Possible spelling mistake found. Context: ...inAndSnow` missing lang entries - Fixed `enableFancyRainAndSnow` missing lang entries - Fixed `enableFa... --- Near line 301: Possible spelling mistake found. Context: ... Fixed `enableFancyRainAndSnow` missing lang entries - Fixed `enableFancyRainAndSnow... --- Near line 302: Possible spelling mistake found. Context: ...inAndSnow` missing lang entries - Fixed `enableFancyRainAndSnow` having the lang entries for `onScreenR... --- Near line 302: Possible spelling mistake found. Context: ...xed `enableFancyRainAndSnow` having the lang entries for `onScreenRainAndSnow` - Fix... --- Near line 306: Did you mean “were” (a form of the verb ‘to be’)? Context: ... ammunition of the magazines after they where crafted when this isn't necessary anymo... --- Near line 316: Possible spelling mistake found. Context: ...not updating if you switched to another hotbar slot while holding the input - Fixed or... --- Near line 317: Possible spelling mistake found. Context: ...ar slot while holding the input - Fixed oreDictionary not working properly under the craftmap... --- Near line 317: Possible spelling mistake found. Context: ...ctionary not working properly under the craftmappings - Fixed the height of the Ammo Counter ... --- Near line 319: Possible spelling mistake found. Context: ...nter being 1 pixel too high - Fixed the flashbang missing sound - Fixed the flashbang mis... --- Near line 320: Possible spelling mistake found. Context: ...the flashbang missing sound - Fixed the flashbang missing knockback - Fixed the flashbang... --- Near line 320: Possible spelling mistake found. Context: ...ing sound - Fixed the flashbang missing knockback - Fixed the flashbang missing particles... --- Near line 321: Possible spelling mistake found. Context: ...flashbang missing knockback - Fixed the flashbang missing particles - Fixed flashbang not... --- Near line 322: Possible spelling mistake found. Context: ...the flashbang missing particles - Fixed flashbang not flashing in every direction - Fixed... --- Near line 323: If this is a compound adjective that modifies the following noun, use a hyphen. Context: ... - Fixed the exposure decreasing on the client side even when the game is paused - Fixed sp... --- Near line 326: Possible spelling mistake. ‘maths’ is British English. Context: ...osition of the shells - Bullet spawning maths which was making the bullets spawn in i... --- Near line 335: Possible spelling mistake found. Context: ...st of the compatibility layer - Removed FXAA - Removed Bloom - Deleted broken Hescob... --- Near line 337: Possible spelling mistake found. Context: ...d FXAA - Removed Bloom - Deleted broken Hescobastion and UMP45GFL props - Removed the vanill... --- Near line 339: Possible spelling mistake found. Context: ...bled) - Removed the `WIP` status of the flashbang as it is fully usable and reliable ###... --- Near line 346: Do you wish to insert an arrow? Context: ... result, the jar size decreased (35.3MB -> 27.57MB) - Improved ShaderLoader - Redu... --- Near line 347: Possible spelling mistake found. Context: ...ecreased (35.3MB -> 27.57MB) - Improved ShaderLoader - Reduced overhead due to the removal o... --- Near line 350: ‘a majority of the’ might be wordy. Consider a shorter alternative. Context: ...sive and use less bandwidth - Optimized a majority of the models as a result,the jar size decreas... --- Near line 350: Put a space after the comma. Context: ...zed a majority of the models as a result,the jar size decreased (27.57MB -> 21.55MB)... --- Near line 350: Do you wish to insert an arrow? Context: ... result,the jar size decreased (27.57MB -> 21.55MB) ### Internal - Switched to [... --- Near line 354: Unpaired symbol: ‘]’ seems to be missing Context: ...(https://github.com/eigenraven) amazing [RetroFuturaGradle](https://github.com/GT... --- Near line 354: Possible spelling mistake found. Context: ...https://github.com/eigenraven) amazing [RetroFuturaGradle](https://github.com/GTNewHorizons/Retro... --- Near line 357: Possible spelling mistake found. Context: ...pdated to Gradle 8.2 - Cleaned up build.gradle & gradle.properties - Gradle now automa... --- Near line 357: Possible spelling mistake found. Context: ... Gradle 8.2 - Cleaned up build.gradle & gradle.properties - Gradle now automatically u... --- Near line 358: This abbreviation for “identification” is spelled all-uppercase. Context: ...w automatically updates the version and id in `ModReference.java` - Updated Forge ... --- Near line 366: The abbreviation for “identification” is spelled all-uppercase, or did you mean “I’d” (= I would/had)? Context: ...d block creation - Changed name and mod id - Overhauled the networking ### Balanc... --- Near line 378: Unpaired symbol: ‘]’ seems to be missing Context: ...iplier` ##### Credits *Order based on [contributors](https://github.com/Cubed-D... --- Near line 381: Possible spelling mistake found. Context: ...le official Modern Warfare Dev Team: - [Desoroxxx](https://github.com/Desoroxxx) - [Stick... --- Near line 383: Possible spelling mistake found. Context: ...(https://github.com/SticksDeveloper) - [Paneedah](https://github.com/Paneedah) - [Koud_W... --- Near line 384: Possible spelling mistake found. Context: ...needah](https://github.com/Paneedah) - [Koud_Wind](https://github.com/Koud-Wind) - [... --- Near line 385: Possible spelling mistake found. Context: ..._Wind](https://github.com/Koud-Wind) - [Azurae](https://github.com/azuraerae) And the... --- Near line 388: Possible spelling mistake found. Context: ...contributed to Modern Warfare Cubed: - [strubium](https://github.com/Cubed-Development/M... --- Near line 393: Possible spelling mistake found. Context: ...Warfare-Cubed/commits?author=333mhz) - [AhmedKrm](https://github.com/Cubed-Development/M... --- Near line 394: Possible spelling mistake found. Context: ...m&since=2023-02-19&until=2023-05-28) - [jbredwards](https://github.com/Cubed-Development/M...
Additional comments not posted (3)
Changelog.md (3)
`16-18`: The updates to the HUD elements are well-documented and align with the PR objectives. The conditional display of the fire mode change prompt, consistent ammo counter for magazines, and crosshair visibility adjustments enhance the user experience. --- `19-19`: Removal of the unused grenade warning is a good cleanup step, reducing potential confusion or clutter in the game interface. --- `21-21`: Ensuring that client-sided mixins are only used on the client side is a best practice that prevents unnecessary code execution on the server side, enhancing performance and maintainability.
--- Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.