-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
243 lines (197 loc) · 6.02 KB
/
.coderabbit.yaml
File metadata and controls
243 lines (197 loc) · 6.02 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# CodeRabbit Configuration for TreeByte-Backend Project
# This file configures how CodeRabbit analyzes and reviews your code
# Global settings
global:
# Enable/disable CodeRabbit for this repository
enabled: true
# Set the default language for reviews
language: "en"
# Configure review behavior
review:
# Enable automatic reviews on pull requests
auto_review: true
# Enable inline comments
inline_comments: true
# Enable summary comments
summary_comments: true
# Set review depth to deep for comprehensive analysis
depth: "deep"
# Enable issue compliance checking
issue_compliance: true
# Enable architecture validation
architecture_validation: true
# File patterns to include/exclude
files:
# Include patterns
include:
- "src/**/*.{ts,tsx,js,jsx}"
- "contracts/**/*.rs"
- "supabase/**/*.sql"
- "*.{json,md,yaml,yml}"
- "*.{toml}"
- "package.json"
- "tsconfig.json"
# Exclude patterns
exclude:
- "node_modules/**"
- "dist/**"
- "build/**"
- "target/**"
- "coverage/**"
- "*.min.js"
- "*.bundle.js"
- "package-lock.json"
- "yarn.lock"
- "pnpm-lock.yaml"
- ".git/**"
- "*.log"
- "*.lock"
- "Cargo.lock"
- "test_snapshots/**"
# Language-specific configurations
languages:
typescript:
# TypeScript/JavaScript specific settings
enabled: true
# Include type checking in reviews
type_check: true
# Check for common TypeScript issues
lint_checks: true
# Check for Express.js specific patterns
express_patterns: true
# Check for proper imports
import_validation: true
rust:
# Rust specific settings for smart contracts
enabled: true
# Check for common Rust issues
lint_checks: true
# Include cargo check in reviews
cargo_check: true
# Security analysis for smart contracts
security_analysis: true
# Soroban-specific patterns
soroban_patterns: true
sql:
# SQL specific settings
enabled: true
# Check for SQL best practices
best_practices: true
# Check for Supabase-specific patterns
supabase_patterns: true
# Security settings
security:
# Enable security scanning
enabled: true
# Check for common vulnerabilities
vulnerability_scan: true
# Check for secrets in code
secret_scan: true
# Check for dependency vulnerabilities
dependency_scan: true
# Blockchain-specific security
blockchain_security: true
stellar_security: true
# Performance settings
performance:
# Enable performance analysis
enabled: true
# Check for performance issues
performance_scan: true
# Check for memory leaks
memory_leak_scan: true
# Database performance
database_performance: true
# Code quality settings
quality:
# Enable code quality checks
enabled: true
# Check for code smells
code_smells: true
# Check for maintainability issues
maintainability: true
# Check for readability issues
readability: true
# Check for complexity issues
complexity: true
# Custom rules and preferences
rules:
# Enforce consistent naming conventions
naming_conventions: true
# Kebab-case for files, PascalCase for classes, camelCase for variables
file_naming: "kebab-case"
class_naming: "PascalCase"
variable_naming: "camelCase"
constant_naming: "UPPER_SNAKE_CASE"
# Check for proper error handling
error_handling: true
# Check for proper documentation (disabled as per requirements)
documentation: false
# Check for test coverage
test_coverage: true
# Check for accessibility issues
accessibility: true
# Architecture validation
single_responsibility: true
service_size_limit: 200 # Maximum lines per service
controller_orchestration: true # Controllers should orchestrate, not implement complex logic
# Import validation
absolute_imports: true # Prefer absolute paths over relative paths
import_grouping: true # Group imports: libraries → internals → relatives
# Code quality
duplicate_code_detection: true
cyclomatic_complexity: true
function_length_limit: 50 # Maximum lines per function
# Issue compliance
issue_requirement_check: true
change_traceability: true
# Blockchain-specific rules
stellar_integration: true
smart_contract_security: true
ipfs_integration: true
# Project-specific settings
project:
# Project type
type: "backend"
# Framework detection
frameworks:
- "express"
- "typescript"
- "rust"
- "stellar"
- "supabase"
# Database type
database: "supabase"
# Blockchain integration
blockchain: "stellar"
# Smart contracts
smart_contracts: true
# IPFS integration
ipfs: true
# Review templates
templates:
# Custom review messages
messages:
security: "🔒 Security review completed"
performance: "⚡ Performance review completed"
quality: "✨ Code quality review completed"
accessibility: "♿ Accessibility review completed"
architecture: "🏗️ Architecture validation completed"
issue_compliance: "✅ Issue compliance check completed"
naming: "📝 Naming conventions check completed"
imports: "📦 Import structure validation completed"
blockchain: "⛓️ Blockchain integration review completed"
smart_contracts: "🔐 Smart contract security review completed"
# Priority-based review messages
priorities:
high: "🚨 HIGH PRIORITY ISSUE"
medium: "⚠️ MEDIUM PRIORITY ISSUE"
low: "ℹ️ LOW PRIORITY ISSUE"
# Architecture-specific messages
architecture:
single_responsibility: "🔧 Service has multiple responsibilities - consider splitting"
large_service: "📏 Service exceeds size limit - consider refactoring"
controller_logic: "🎭 Controller contains complex logic - move to services"
relative_imports: "🔄 Use absolute imports instead of relative paths"
stellar_integration: "⭐ Stellar blockchain integration patterns validated"
smart_contract_security: "🔐 Smart contract security patterns validated"