Skip to content

Commit 41b4dcc

Browse files
committed
chore: add real-world coderabbit config examples for python, typescript, javascript and docs
1 parent 8b1ef7f commit 41b4dcc

5 files changed

+298
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
language: "en-US"
2+
early_access: true
3+
reviews:
4+
request_changes_workflow: false
5+
high_level_summary: true
6+
poem: true
7+
review_status: true
8+
collapse_walkthrough: true
9+
path_filters:
10+
- "!**/.xml"
11+
path_instructions:
12+
- path: "lib/**/*.dart"
13+
instructions: |
14+
"Review the Dart code. Confirm that:
15+
- The docstrings are up-to-date with the implementations. Please highlight the outdated ones.
16+
- When an API in a module changes, ensure that all modules that depend on the changed module are updated accordingly.
17+
- When seeing a TODO comment, try to write code to complete the todo."
18+
- path: "test/**/*"
19+
instructions: |
20+
"Assess the unit test code employing the Pytest testing framework. Confirm that:
21+
- The tests adhere to Dart test's established best practices.
22+
- Test descriptions are sufficiently detailed to clarify the purpose of each test.
23+
- The tests cover all methods, classes, and errors."
24+
auto_review:
25+
enabled: true
26+
ignore_title_keywords:
27+
- "WIP"
28+
drafts: true
29+
base_branches:
30+
- "develop"
31+
- "feat/*"
32+
- "setup/*"
33+
chat:
34+
auto_reply: true
Lines changed: 32 additions & 0 deletions
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
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
language: en-GB
2+
tone_instructions: ''
3+
early_access: false
4+
enable_free_tier: true
5+
reviews:
6+
profile: chill
7+
request_changes_workflow: true
8+
high_level_summary: true
9+
high_level_summary_placeholder: '@coderabbitai summary'
10+
auto_title_placeholder: '@coderabbitai'
11+
review_status: true
12+
commit_status: true
13+
poem: false
14+
collapse_walkthrough: true
15+
sequence_diagrams: false
16+
changed_files_summary: true
17+
labeling_instructions: []
18+
path_filters:
19+
- '**/*'
20+
- '**/gen/**'
21+
- '!**/test/**/gen/**'
22+
- '!**/.git/**'
23+
- '!**/target/**'
24+
path_instructions:
25+
- path: '**/*.java'
26+
instructions: |
27+
- Review code using Java 21 standards, taking into account the rules defined by `src/main/checkstyle/checkstyle.xml`.
28+
- Validate that code indentation uses spaces, not tabs, with an indent of multiple of 4.
29+
- Validate that immutable local variables are not annotated with `final` unless the variable is required for use in an inner class.
30+
- Allow use of `var` keyword when value is a cast `null`.
31+
- Use a coding standard where multi-line expressions have operators and tenary separators at the end of line.
32+
- Propose changes that only use the Java 21 API, not the API of Guava.
33+
- The pattern matching `instanceof` expression safely handles `null`, returning `false`.
34+
- path: '**/main/java/**/*.java'
35+
instructions: |
36+
- This project is mature and must provide a stable backwards-compatible public Java API.
37+
- In the 'Summary by CodeRabbit' section, you must always provide a list of up to 25 changes to the public Java API that will affect end users.
38+
If there are no changes, you must explicitly state that there are no changes to the public Java API in this PR.
39+
The public Java API is defined as public and protected methods on public classes, plus the file `module-info.java`.
40+
Provide the list by deeply analysing code flow, which incudes analysing code flow through private methods and calls to Guava and Java 21.
41+
Changes to be reported on include:
42+
- New or removed methods in the public Java API
43+
- Changes to method return types or parameter types in the public Java API
44+
- Changes to method behaviour in the public Java API that might affect consumers
45+
- This project uses `System.out.println` instead of logging
46+
- This project tends to prefer `for` loops to streams for performance reasons, however either form is acceptable.
47+
Do not make suggestions to change between streams and for loops or vice versa.
48+
- path: '**/test/java/**/*.java'
49+
instructions: |
50+
For test code, focus on:
51+
- Correctness of test assertions
52+
- Test coverage of edge cases
53+
- Clear test naming and documentation
54+
- Be more lenient with code style and minor optimisations
55+
abort_on_close: true
56+
auto_review:
57+
enabled: true
58+
auto_incremental_review: true
59+
ignore_title_keywords: []
60+
labels: []
61+
drafts: false
62+
base_branches:
63+
- 'main'
64+
tools:
65+
shellcheck:
66+
enabled: true
67+
ruff:
68+
enabled: false
69+
markdownlint:
70+
enabled: true
71+
github-checks:
72+
enabled: true
73+
timeout_ms: 90000
74+
languagetool:
75+
enabled: true
76+
enabled_only: false
77+
level: default
78+
enabled_rules: []
79+
disabled_rules:
80+
- EN_UNPAIRED_BRACKETS
81+
enabled_categories: []
82+
disabled_categories:
83+
- TYPOS
84+
- TYPOGRAPHY
85+
- CASING
86+
biome:
87+
enabled: true
88+
hadolint:
89+
enabled: false
90+
swiftlint:
91+
enabled: true
92+
phpstan:
93+
enabled: false
94+
level: default
95+
golangci-lint:
96+
enabled: false
97+
yamllint:
98+
enabled: true
99+
gitleaks:
100+
enabled: true
101+
checkov:
102+
enabled: false
103+
detekt:
104+
enabled: false
105+
eslint:
106+
enabled: true
107+
rubocop:
108+
enabled: false
109+
buf:
110+
enabled: false
111+
regal:
112+
enabled: false
113+
actionlint:
114+
enabled: true
115+
pmd:
116+
enabled: true
117+
cppcheck:
118+
enabled: false
119+
semgrep:
120+
enabled: true
121+
circleci:
122+
enabled: true
123+
ast-grep:
124+
packages: []
125+
rule_dirs: []
126+
util_dirs: []
127+
essential_rules: true
128+
chat:
129+
auto_reply: true
130+
knowledge_base:
131+
opt_out: false
132+
learnings:
133+
scope: auto
134+
issues:
135+
scope: auto
136+
jira:
137+
project_keys: []
138+
linear:
139+
team_keys: []
140+
pull_requests:
141+
scope: auto
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
language: 'en'
2+
early_access: true
3+
reviews:
4+
request_changes_workflow: true
5+
high_level_summary: true
6+
poem: false
7+
review_status: true
8+
collapse_walkthrough: false
9+
path_instructions:
10+
- path: 'apps/services/**/*'
11+
instructions: |
12+
"Confirm that the code adheres to the following:
13+
- NestJS architecture, including modules, services, and controllers.
14+
- Dependency injection patterns and service encapsulation.
15+
- Integration and unit testing coverage and practices."
16+
- path: 'apps/**/*'
17+
instructions: |
18+
"Confirm that the code adheres to the following:
19+
- NextJS best practices, including file structure, API routes, and static generation methods.
20+
- Efficient state management and server-side rendering techniques.
21+
- Optimal use of TypeScript for component and utility type safety."
22+
- path: 'libs/services/**/*'
23+
instructions: |
24+
"Confirm that the code adheres to the following:
25+
- Shared services and modules that can be utilized across NestJS apps.
26+
- Proper implementation of NestJS providers, including custom providers.
27+
- Adherence to NestJS module encapsulation and isolation principles."
28+
- path: 'libs/shared/**/*'
29+
instructions: |
30+
"Confirm that the code adheres to the following:
31+
- Cross-application utility functions, types, and constants.
32+
- TypeScript best practices to ensure type safety and reusability.
33+
- Documentation and examples for library consumers."
34+
- path: 'libs/**/*'
35+
instructions: |
36+
"Confirm that the code adheres to the following:
37+
- Reusability of components and hooks across different NextJS apps.
38+
- TypeScript usage for defining props and exporting types.
39+
- Effective tree-shaking and bundling practices."
40+
- path: 'scripts/**/*'
41+
instructions: |
42+
"Confirm that the code adheres to the following:
43+
- Script efficiency, readability, and maintainability.
44+
- Usage of environmental variables and configuration files for flexibility.
45+
- Integration with NX workspace utilities and commands."
46+
- path: 'infra/src/dsl/**/*'
47+
instructions: |
48+
"Confirm that the code adheres to the following:
49+
- The clarity and expressiveness of the DSL syntax.
50+
- Integration with Helm charts and Kubernetes resources.
51+
- Documentation on how to use the DSL to create complex Helm values."
52+
auto_review:
53+
enabled: true
54+
drafts: false
55+
base_branches:
56+
- 'main'
57+
chat:
58+
auto_reply: true
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
language: "en-US"
2+
early_access: true
3+
reviews:
4+
request_changes_workflow: false
5+
high_level_summary: true
6+
poem: true
7+
review_status: true
8+
collapse_walkthrough: true
9+
path_filters:
10+
- "!**/.xml"
11+
path_instructions:
12+
- path: "src/**/*.js"
13+
instructions: |
14+
"Review JavaScript Code."
15+
- path: "src/**/*.jsx"
16+
instructions: |
17+
"Review ReactJs Code."
18+
- path: "src/**/*.ts"
19+
instructions: |
20+
"Review TypeScript Code."
21+
- path: "src/**/*.tsx"
22+
instructions: |
23+
"Review ReactJs + TypeScript Code."
24+
auto_review:
25+
enabled: true
26+
ignore_title_keywords:
27+
- "WIP"
28+
drafts: true
29+
base_branches:
30+
- "develop"
31+
- "feature/*"
32+
chat:
33+
auto_reply: true

0 commit comments

Comments
 (0)