Skip to content

Commit c827774

Browse files
committed
chore: add real-world coderabbit config examples for python, typescript, javascript and golang
1 parent e23730d commit c827774

File tree

4 files changed

+139
-0
lines changed

4 files changed

+139
-0
lines changed

configs/django/coderabbit-clean.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
language: "en-US"
3+
early_access: false
4+
reviews:
5+
profile: "chill"
6+
request_changes_workflow: false
7+
high_level_summary: true
8+
poem: true
9+
review_status: true
10+
collapse_walkthrough: false
11+
auto_review:
12+
enabled: true
13+
drafts: false
14+
path_instructions:
15+
- path: "**/*.py"
16+
instructions: |
17+
Review the following code using Python Django. Ensure that:
18+
- Ensure each method has a clear, detailed docstring explaining its purpose, parameters, and return values. Enhance existing docstrings for clarity and completeness.
19+
- Do not suggest adding type annotations.
20+
- Review Django querysets for potential performance improvements and suggest optimizations where applicable.
21+
- Ensure that for every model.save() there is a model.full_clean() that precedes it.
22+
- Avoid adding generic exception handling (e.g., `except Exception`) in test files. Each test failure should be addressed by the developer with specific exception handling or fixes.
23+
- Avoid adding comments relating to importing modules.
24+
- path: "tests/*.py"
25+
instructions: |
26+
- There is no sensitive information in the test files. All data handled is procedural/generic and non-sensitive.
27+
chat:
28+
auto_reply: true

configs/go/coderabbit-actor-ddd.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
language: "en"
2+
early_access: true
3+
tone_instructions: |
4+
Be casual, friendly, and egoless, using approachable, clear, and conversational language that feels warm and engaging.
5+
Keep the writing light, concise, and positive, as if speaking to a peer.
6+
reviews:
7+
request_changes_workflow: true
8+
high_level_summary: true
9+
poem: false
10+
review_status: true
11+
collapse_walkthrough: false
12+
sequence_diagrams: true
13+
path_filters:
14+
- "!**/*.pb.go"
15+
path_instructions:
16+
- path: "**/*.go"
17+
instructions: |
18+
Review the Golang files with a focus on the project's goals:
19+
- Actor Model Integration: Ensure the code effectively utilizes the [protoactor](https://github.com/AsynkronIT/protoactor-go)
20+
framework, adhering to best practices of the Actor Model.
21+
- Domain-Driven Design: Verify that Domain-Driven Design principles are integrated properly, with clear separation of concerns
22+
and well-defined domain models. Ensure the use of Event Sourcing is correctly implemented in the Actor-based system.
23+
- Code Quality and Maintainability: Focus on readability, proper use of Go idioms, and maintainable code structure. Check
24+
for consistent naming conventions, efficient error handling, and adequate documentation, including meaningful comments where needed.
25+
- Performance and Scalability: Identify any potential areas for performance improvement, especially concerning actor behavior,
26+
concurrency, and data persistence. Suggest refactoring if the code can be streamlined or optimized.
27+
- path: "**/*.md"
28+
instructions: |
29+
Review markdown documentation with these guidelines:
30+
- Structure: Ensure consistent heading hierarchy and document organization
31+
- Content: Verify accuracy of technical details, code examples, and API references
32+
- Quality: Check for spelling, grammar, and broken links
33+
- Completeness: Confirm all features and changes are properly documented
34+
- Style: Follow project's documentation style guide and formatting conventions
35+
auto_review:
36+
enabled: true
37+
drafts: false
38+
base_branches:
39+
- "main"
40+
chat:
41+
auto_reply: true
42+
auto_reply_messages:
43+
greeting: "👋 Thanks for the mention! 😊 I'm here to assist with your code review."
44+
help_request: "🫡 I'm on it! What specific aspect would you like me to focus on?"
45+
triggers:
46+
- keywords: ["help", "review", "check"]
47+
response: "👌 Got it! I'll review that for you right away."

configs/go/coderabbit-uber-e2e.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
language: "en"
2+
early_access: false
3+
reviews:
4+
request_changes_workflow: false
5+
high_level_summary: true
6+
poem: false
7+
review_status: false
8+
collapse_walkthrough: true
9+
path_filters:
10+
- "!**/*.pb.go"
11+
- "!**/*.pb.gw.go"
12+
- "!**/*.mod"
13+
- "!**/*.sum"
14+
path_instructions:
15+
- path: "**/*.go"
16+
instructions: "Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations."
17+
- path: "e2e/**/*"
18+
instructions: |
19+
"Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"
20+
- path: "**/*_test.go"
21+
instructions: |
22+
"Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"
23+
- path: "**/*.md"
24+
instructions: |
25+
"Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
26+
auto_review:
27+
enabled: false
28+
ignore_title_keywords:
29+
- "WIP"
30+
- "DO NOT MERGE"
31+
drafts: false
32+
base_branches:
33+
- "main"
34+
chat:
35+
auto_reply: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
language: "en"
3+
early_access: false
4+
reviews:
5+
profile: "chill"
6+
request_changes_workflow: false
7+
high_level_summary: true
8+
poem: true
9+
review_status: true
10+
collapse_walkthrough: false
11+
sequence_diagrams: false
12+
auto_review:
13+
enabled: true
14+
drafts: false
15+
base_branches:
16+
- development
17+
- feat/.*
18+
path_instructions:
19+
- path: "**/*.js"
20+
instructions:
21+
"Review the JavaScript code for conformity with the Google
22+
JavaScript style guide, highlighting any deviations."
23+
- path: "tests/**/*"
24+
instructions:
25+
"Assess the unit test code employing the Mocha testing framework.
26+
Test descriptions must be sufficiently detailed to clarify the
27+
purpose of each test."
28+
chat:
29+
auto_reply: true

0 commit comments

Comments
 (0)