Skip to content

Commit e23730d

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

File tree

6 files changed

+234
-0
lines changed

6 files changed

+234
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
language: en-US
2+
tone_instructions: ''
3+
early_access: false
4+
enable_free_tier: true
5+
reviews:
6+
profile: assertive
7+
request_changes_workflow: false
8+
high_level_summary: true
9+
high_level_summary_placeholder: '@coderabbitai summary'
10+
auto_title_placeholder: '@coderabbitai'
11+
review_status: true
12+
poem: true
13+
collapse_walkthrough: false
14+
sequence_diagrams: true
15+
path_filters: [
16+
"!**/*.ptxt"
17+
]
18+
path_instructions: [
19+
{
20+
"path": "drafts/*.md",
21+
"instructions": "These are PHP RFC's to change the PHP language. Do not just consider the grammar of the text, but consider how it might change the language. For example, if a new feature is being added, consider how it might be used, and propose better ideas if you have them."
22+
}
23+
]
24+
abort_on_close: true
25+
auto_review:
26+
enabled: true
27+
auto_incremental_review: true
28+
ignore_title_keywords: []
29+
labels: []
30+
drafts: false
31+
base_branches: []
32+
tools:
33+
shellcheck:
34+
enabled: true
35+
ruff:
36+
enabled: true
37+
markdownlint:
38+
enabled: true
39+
github-checks:
40+
enabled: true
41+
timeout_ms: 90000
42+
languagetool:
43+
enabled: true
44+
enabled_only: false
45+
level: default
46+
biome:
47+
enabled: true
48+
hadolint:
49+
enabled: true
50+
swiftlint:
51+
enabled: true
52+
phpstan:
53+
enabled: true
54+
level: default
55+
golangci-lint:
56+
enabled: true
57+
yamllint:
58+
enabled: true
59+
gitleaks:
60+
enabled: true
61+
checkov:
62+
enabled: true
63+
detekt:
64+
enabled: true
65+
eslint:
66+
enabled: true
67+
chat:
68+
auto_reply: true
69+
knowledge_base:
70+
opt_out: false
71+
learnings:
72+
scope: auto
73+
issues:
74+
scope: auto
75+
jira:
76+
project_keys: []
77+
linear:
78+
team_keys: []

configs/go/coderabbit-uber-style.yaml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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: true
8+
collapse_walkthrough: true
9+
path_filters:
10+
- "!api/"
11+
path_instructions:
12+
- path: "**/*.go"
13+
instructions: "Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations."
14+
- path: "tests/**/*"
15+
instructions: |
16+
"Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"
17+
- path: "**/*_test.go"
18+
instructions: |
19+
"Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"
20+
- path: "**/*.md"
21+
instructions: |
22+
"Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
23+
auto_review:
24+
enabled: true
25+
ignore_title_keywords:
26+
- "WIP"
27+
- "DO NOT MERGE"
28+
drafts: false
29+
base_branches:
30+
- "main"
31+
chat:
32+
auto_reply: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
language: "en-US"
2+
early_access: false
3+
reviews:
4+
path_instructions:
5+
- path: "*"
6+
instructions: |
7+
Review the JavaScript code against the following rules:
8+
- No new libraries are added.
9+
- Only functional components, no class components.
10+
- No commented code.
11+
- No Console.log.
12+
- Pascalcase for components, routes and pages. Example, catalogueIndex.js -> WRONG, CatalogueIndex.js -> CORRECT
13+
- Follow Camelcase. Example, Is-Open -> WRONG, is_open -> WRONG, isOpen -> WRONG, saveProfileModalIsOpen -> CORRECT, openStateSaveProfileModal -> CORRECT, isSaveProfileModalOpen -> CORRECT
14+
- State management, useState is preferred and redux is preferred. Example, const [isSaveProfileModalOpen, setIsSaveProfileModalOpen] = useState(false)\n const dispatch = useDispatch(); \nconst Button = useSelector((state) => state.nav.Button) \ndispatch(setButton(buttons[0]));
15+
- MaterialUI is the preferred library.
16+
- Avoid the container and item layout model, use display flex and flex properties within the sx part of a Grid tag. Example, WRONG -> <Grid container xs={6} md={12}> <Grid item> …, CORRECT -> <Grid sx={{display “flex”, flexDirection “row”, width isMobile ? “50%” “100%”> <Grid> …
17+
- No secret, API key, ssh key or any sensitive information should be hard coded and pushed.
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
language: en
2+
early_access: false
3+
reviews:
4+
high_level_summary: true
5+
poem: false
6+
review_status: true
7+
collapse_walkthrough: false
8+
path_filters:
9+
- "!**/.github/workflows/*"
10+
- "!**/node_modules/**" # Exclude dependencies
11+
- "!**/dist/**" # Exclude build files
12+
path_instructions:
13+
- path: "src/**/*.{ts,js}"
14+
instructions: "Review the TypeScript/JavaScript code for NestJS best practices, dependency injection, module structure, and potential bugs. Ensure that the code adheres to TypeScript's typing system and modern standards."
15+
- path: "src/**/*.spec.ts"
16+
instructions: "Review the unit tests, ensuring proper NestJS testing techniques (using TestingModule, mocks, etc.). Check for completeness and coverage."
17+
- path: "manifests/**/*.{yaml,yml}"
18+
instructions: "Review the kubernetes manifests used in Github workflows."
19+
- path: "**/Dockerfile"
20+
instructions: "Review the Dockerfile for best practices in building, optimizing, and running a NestJS application."
21+
- path: "**/quickstart-services.yml"
22+
instructions: "Review Docker Compose configurations for environment setup, ensuring proper service configuration, network setup, and environment variables handling."
23+
- path: "**/quickstart-services-ai.yml"
24+
instructions: "Review Docker Compose configurations for environment setup, ensuring proper service configuration, network setup, and environment variables handling."
25+
- path: "**/quickstart-services-ai-debug.yml"
26+
instructions: "Review Docker Compose configurations for environment setup, ensuring proper service configuration, network setup, and environment variables handling."
27+
- path: "**/quickstart-services-kratos-debug.yml"
28+
instructions: "Review Docker Compose configurations for environment setup, ensuring proper service configuration, network setup, and environment variables handling."
29+
- path: "**/*.md"
30+
instructions: "Ensure the documentation is clear, concise, and up-to-date, with accurate instructions for running the NestJS application in Docker."
31+
chat:
32+
auto_reply: true
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json
2+
language: "en"
3+
early_access: true
4+
reviews:
5+
high_level_summary: true
6+
poem: false
7+
review_status: true
8+
collapse_walkthrough: false
9+
path_filters:
10+
- "!dist/**"
11+
path_instructions:
12+
- path: "__tests__/**.*"
13+
instructions: |
14+
"Assess the unit test code employing the Vitest testing framework. Confirm that:
15+
- The tests adhere to Vitest's established best practices.
16+
- Test descriptions are sufficiently detailed to clarify the purpose of each test."
17+
auto_review:
18+
enabled: true
19+
ignore_title_keywords:
20+
- "WIP"
21+
- "DO NOT MERGE"
22+
drafts: false
23+
base_branches:
24+
- "main"
25+
- "next"
26+
chat:
27+
auto_reply: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
language: en
2+
early_access: false
3+
reviews:
4+
high_level_summary: true
5+
sequence_diagrams: true
6+
poem: false
7+
review_status: true
8+
collapse_walkthrough: false
9+
changed_files_summary: true
10+
path_filters:
11+
- "!**/.github/**"
12+
- "!**/node_modules/**" # Exclude dependencies
13+
path_instructions:
14+
- path: "src/**/*.{ts,tsx,js}"
15+
instructions: |
16+
Review the React.js/TypeScript/JavaScript code for best practices and potential bugs.
17+
Ensure that the code adheres to TypeScript's typing system and modern standards.
18+
Ensure sufficient error handling and logging is present.
19+
Check for common security vulnerabilities such as:
20+
- SQL Injection
21+
- XSS (Cross-Site Scripting)
22+
- CSRF (Cross-Site Request Forgery)
23+
- Insecure dependencies
24+
- Sensitive data exposure
25+
- path: "src/**/*.{graphql,gql}"
26+
instructions: |
27+
Review the GraphQL schema and queries for best practices, potential bugs, and adherence to the project's GraphQL standards.
28+
Ensure that the schema is well-defined and queries are optimized.
29+
Check for security vulnerabilities.
30+
- path: "src/**/*.json"
31+
instructions: |
32+
Review the JSON files for correct syntax and structure.
33+
Ensure that the configuration and data are accurate and follow the project's standards.
34+
Check for sensitive data exposure and ensure that the data is properly validated.
35+
- path: "public/**/*.html"
36+
instructions: |
37+
Review the HTML files for correct syntax and structure.
38+
Ensure that the content is accessible, semantic, and follows the project's standards.
39+
- path: "src/**/*.yaml"
40+
instructions: |
41+
Review the YAML files for correct syntax and structure.
42+
Ensure that the configuration is accurate and follows the project's standards.
43+
Check for potential security issues and ensure that the data is properly validated.
44+
- path: "**/*.md"
45+
instructions: "Ensure the documentation is clear, concise, and up-to-date, with accurate instructions."
46+
chat:
47+
auto_reply: true
48+

0 commit comments

Comments
 (0)