-
-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
180 lines (157 loc) · 6.83 KB
/
.coderabbit.yaml
File metadata and controls
180 lines (157 loc) · 6.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# Enables IDE autocompletion for this config file
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
# Language for CodeRabbit's review comments
language: en
# Enable experimental features (currently not using any specific early_access features)
early_access: true
chat:
# CodeRabbit will automatically respond to @coderabbitai mentions in PR comments
auto_reply: true
issue_enrichment:
labeling:
auto_apply_labels: true
labeling_instructions:
- label: bug
instructions: Issues reporting bugs, errors, crashes, incorrect behavior, or unexpected results. This includes runtime errors, logic errors, broken functionality, regressions, and any deviation from expected or documented behavior.
- label: enhancement
instructions: Feature requests, improvements to existing functionality, performance optimizations, refactoring suggestions, UI/UX enhancements, and any suggestions to make the project better or add new capabilities.
- label: documentation
instructions: Documentation updates, additions, corrections, or clarifications needed. This includes missing docs, outdated information, unclear instructions, API documentation, code examples, README improvements, and any requests for better explanations or guides.
planning:
enabled: true
auto_planning:
enabled: true
labels:
- "plan-me" # Auto-plan issues with this label
- "feature" # Also auto-plan these
- "!no-plan" # Never auto-plan issues with this label
reviews:
profile: assertive # Options: chill (focuses on significant issues, less nitpicky about style), assertive (more thorough, flags style issues and minor improvements too)
auto_review:
# Automatically trigger reviews when PRs are opened or updated
enabled: true
# Skip auto-review if PR title contains these keywords
ignore_title_keywords:
- "WIP"
# Don't auto-review draft PRs
drafts: false
# Only auto-review PRs targeting these branches
base_branches:
- main
- develop
# Include a high-level summary at the start of each review
high_level_summary: true
# Generate sequence diagrams for complex code flows
sequence_diagrams: true
# Include poems in reviews
poem: true
# Show review completion status
review_status: true
# Keep the walkthrough section expanded by default
collapse_walkthrough: false
# Include summary of all changed files
changed_files_summary: true
# Automatically request changes on the PR (just leave comments)
request_changes_workflow: true
# Pre-merge checks to enforce before merging PRs
pre_merge_checks:
description:
# Validate that PR has a proper description
mode: warning # Options: off, warning, error
docstrings:
# Disable docstring coverage checks (let's assume we don't need them)
mode: off
# Exclude these paths from reviews (build artifacts and dependencies)
path_filters:
- "!**/build/**" # Flutter build output
- "!**/.dart_tool/**" # Dart tool cache
- "!**/android/**" # Native Android build files
- "!**/ios/**" # Native iOS build files
- "!**/windows/**" # Windows build files
- "!**/linux/**" # Linux build files
- "!**/macos/**" # macOS build files
- "!**/dist/**" # Any distribution output
# Use the following tools when reviewing
tools:
markdownlint:
enabled: true
github-checks:
enabled: true
timeout_ms: 90000
languagetool:
enabled: true
enabled_only: false
level: default
yamllint:
enabled: true
gitleaks:
enabled: true
# Apply the following labels to PRs
labeling_instructions:
- label: Dart/Flutter
instructions: Apply when the PR/MR contains changes to Dart or Flutter source-code
- label: Documentation
instructions: >-
Apply whenever project documentation (namely markdown source-code) is
updated by the PR/MR
# Review instructions that apply to all files
instructions: >-
- Verify that documentation and comments are free of spelling mistakes
- Ensure that test code is automated, comprehensive, and follows testing best practices
- Verify that all critical functionality is covered by tests
- Confirm that the code meets the project's requirements and objectives
- Confirm that copyright years are up-to date whenever a file is changed
- Point out redundant obvious comments that do not add clarity to the code
- Ensure that comments are concise and suggest more concise comment statements if possible
- Discourage usage of verbose comment styles such as NatSpec
- Look for code duplication
- Suggest code completions when:
- seeing a TODO comment
- seeing a FIXME comment
# Custom review instructions for specific file patterns
path_instructions:
# Dart/Flutter files
- path: "**/*.dart"
instructions: |
Dart/Flutter Best Practices:
- Ensure code follows Effective Dart style guide
- Verify proper use of const constructors where applicable
- Check for null safety compliance (? and !)
- Review for proper state management patterns (Provider usage)
- Ensure widget composition is appropriate and not overly complex
- Check for memory leaks and proper disposal of resources
- Verify proper error handling and exception catching
- Ensure async/await is used correctly for Future handling
- Review for performance issues (rebuilds, expensive operations)
- Verify proper theming and design system adherence
- Check for proper navigation and routing patterns
Security:
- Sensitive data should never be logged or stored insecurely
- Use secure storage for tokens and credentials (expo-secure-store or similar)
- Verify API calls use HTTPS
- Check for proper input validation
# Dart test files
- path: "**/*.test.dart"
instructions: |
Review test files for:
- Comprehensive coverage of widget and service behavior
- Proper use of mocking frameworks for dependencies
- Async behavior is properly tested
- Test descriptions are clear and descriptive
- Tests are not tautological and actually validate behavior
# Markdown documentation files
- path: "**/*.md"
instructions: |
Review documentation for:
- Clear and concise explanations
- Proper formatting and structure
- Accurate code examples
- Up-to-date information matching the codebase
# Asset files (images, fonts, etc.)
- path: "assets/**/*"
instructions: |
Review asset files for:
- Image optimization (appropriate size and format)
- Proper @2x and @3x variants for different screen densities
- SVG assets are optimized
- Font files are licensed and optimized