-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
554 lines (469 loc) · 16.3 KB
/
.coderabbit.yaml
File metadata and controls
554 lines (469 loc) · 16.3 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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: ko-KR
tone_instructions: "Respond in Korean for all review and chat outputs. Prioritize correctness, security, maintainability, architecture boundaries, and test quality. Provide concise evidence and concrete fix guidance."
early_access: false
enable_free_tier: true
inheritance: false
reviews:
profile: assertive
request_changes_workflow: false
high_level_summary: true
high_level_summary_instructions: |
Write the summary in Korean.
- Start with a short statement of end-user impact.
- Then list architecture changes, risk areas, and migration/compatibility concerns.
- End with a validation checklist and rollout notes.
Keep it factual and implementation-focused.
high_level_summary_placeholder: "@coderabbitai summary"
high_level_summary_in_walkthrough: true
auto_title_placeholder: "@coderabbitai"
auto_title_instructions: |
Generate the PR title in Korean using this format:
<type>(<scope>): <short outcome>
Examples:
- feat(admission): add score normalization for late submissions
- fix(gateway): prevent null principal in JWT filter
review_status: true
review_details: true
commit_status: true
fail_commit_status: true
collapse_walkthrough: true
changed_files_summary: true
sequence_diagrams: true
estimate_code_review_effort: true
assess_linked_issues: true
related_issues: true
related_prs: true
suggested_labels: true
labeling_instructions:
- label: "bug"
instructions: "Suggest when the PR primarily fixes incorrect behavior, production defect paths, or regression conditions."
- label: "feature"
instructions: "Suggest when new user-visible behavior or product capabilities are introduced."
- label: "enhancement"
instructions: "Suggest for non-breaking improvements to performance, reliability, or developer experience."
- label: "refactor"
instructions: "Suggest when logic is reorganized without user-facing behavior change."
- label: "kotlin"
instructions: "Suggest when most changed files are Kotlin (*.kt) modules."
- label: "go"
instructions: "Suggest when most changed files are Go (*.go) services."
- label: "bazel"
instructions: "Suggest when BUILD.bazel, MODULE.bazel, or *.bzl files are changed."
- label: "docs"
instructions: "Suggest when the PR primarily changes Markdown docs, ADR/AOD templates, or guidance files."
- label: "security"
instructions: "Suggest when authn/authz, secret handling, dependency risk, or attack-surface changes are introduced."
- label: "test"
instructions: "Suggest when the PR mostly adds or changes tests and test utilities."
auto_apply_labels: false
suggested_reviewers: true
auto_assign_reviewers: false
in_progress_fortune: false
poem: false
enable_prompt_for_ai_agents: true
path_filters:
- "systems/**"
- "packages/**"
- "contracts/**"
- "documents/**"
- ".github/**"
- "BUILD.bazel"
- "MODULE.bazel"
- "**/BUILD.bazel"
- "**/*.bzl"
- "**/*.kt"
- "**/*.go"
- "**/*.md"
- "!**/go.sum"
- "!**/*.lock"
- "!**/dist/**"
- "!**/build/**"
- "!**/bazel-bin/**"
- "!**/bazel-out/**"
- "!**/bazel-testlogs/**"
path_instructions:
- path: "**/*.kt"
instructions: |
Apply Kotlin Official Coding Conventions.
Formatting and structure:
- Use 4 spaces for indentation; no tabs.
- Keep files focused and readable; avoid horizontal alignment for spacing.
- Place related declarations together and keep overloads adjacent.
- Keep implementation member order stable and logical for readability.
Naming:
- Package names are lowercase and do not use underscores.
- Class/object names use UpperCamelCase.
- Functions/properties/local variables use lowerCamelCase.
- Constants use UPPER_SNAKE_CASE only for true constants.
API and null-safety:
- Avoid platform type leakage in public APIs.
- Use explicit types in public APIs when inference obscures meaning.
- Prefer immutable values (`val`) over mutable values (`var`) unless mutation is required.
- Flag nullable flows that can be replaced with safer modeling.
Imports and idioms:
- Avoid wildcard imports unless justified by language/tooling conventions.
- Prefer expression bodies for short, clear functions.
- Prefer standard library idioms over custom utility wrappers when equivalent.
Architecture and tests:
- Respect module boundaries (domain/application/adapter/bootstrap layering).
- Highlight behavior-changing code that lacks corresponding unit/integration tests.
- Ask for deterministic tests and meaningful assertions, not only happy-path checks.
- path: "**/*.go"
instructions: |
Apply Uber Go Style Guide.
Interfaces and types:
- Do not use pointers to interfaces (*MyInterface).
- Prefer compile-time interface compliance checks for key public types.
- Pass ownership intentionally: copy maps/slices at boundaries when mutation could leak.
Errors and reliability:
- Handle each error once and add context when propagating.
- Prefer wrapped errors (%w) where callers need errors.Is/errors.As.
- Avoid panic in application flow; return errors instead.
Concurrency and lifecycle:
- Avoid fire-and-forget goroutines without cancellation/coordination.
- Use context propagation consistently for I/O and request-scoped operations.
- Channel buffer size should be justified; default to unbuffered or size 1.
Globals and initialization:
- Avoid mutable globals; favor dependency injection.
- Avoid init() for behaviorful setup, and never start goroutines in init().
Time and imports:
- Use time.Time and time.Duration rather than plain integers for time values.
- Keep import groups ordered (stdlib, third-party, internal).
Testing:
- Prefer table-driven tests where they simplify coverage.
- Keep test names behavior-focused and assertions explicit.
- path: "**/BUILD.bazel"
instructions: |
Apply Bazel BUILD style guidance.
Core rules:
- BUILD formatting must match buildifier output.
- Prefer DAMP BUILD files over over-abstracted DRY patterns.
- Keep top-level layout clear: load() first, then package/default visibility, then targets.
Target definitions:
- Keep deps explicit and close to each target's real direct dependencies.
- Avoid recursive globs unless there is a clear, documented reason.
- Avoid top-level list comprehensions for generating many targets.
- Prefer literal labels and stable naming for readability and tooling compatibility.
- Use boolean values (True/False), not numeric stand-ins.
Maintenance:
- Flag duplicated target logic that should be moved into a macro.
- Flag macro usage that hides important dependency or visibility decisions.
- path: "**/*.bzl"
instructions: |
Apply Bazel Starlark (.bzl) style guidance.
Readability and docs:
- Keep file/module docstrings and docstrings for public functions/macros.
- Use descriptive parameter names and document attribute intent.
API design:
- Macros should take a `name` argument and derive generated target names from it.
- Prefer keyword arguments when calling macros for clarity and stability.
- Keep macro side effects predictable and visible.
Encapsulation:
- Use private visibility for helper targets created by macros unless explicitly public.
- Avoid exposing internal implementation targets unintentionally.
Tooling:
- Enforce buildifier formatting and lint compliance.
- path: "documents/**/*.md"
instructions: |
For design and architecture docs:
- Check consistency between problem statement, decision, and consequences.
- Require explicit trade-offs and rollback/migration strategy when relevant.
- Ensure terminology is consistent across related docs.
- path: ".github/**/*.md"
instructions: |
For issue/PR templates:
- Ensure template fields are objective, testable, and easy to complete.
- Favor prompts that collect risk, rollout, and validation evidence.
- path: ".github/workflows/**/*.yml"
instructions: |
For workflow files:
- Verify least-privilege permissions.
- Flag unpinned actions or unsafe token usage.
- Ensure required checks align with branch protection and review policy.
abort_on_close: true
disable_cache: false
auto_review:
enabled: true
description_keyword: "@coderabbitai review"
auto_incremental_review: true
auto_pause_after_reviewed_commits: 10
ignore_title_keywords:
- "WIP"
- "DO NOT MERGE"
- "DRAFT"
- "RFC"
labels:
- "!wip"
- "!do-not-review"
- "ready-for-review"
drafts: false
base_branches:
- "main"
- "develop"
- "release/.*"
- "hotfix/.*"
ignore_usernames: []
finishing_touches:
docstrings:
enabled: true
unit_tests:
enabled: true
custom:
- enabled: true
name: "cleanup stale imports"
instructions: |
Remove stale or unused imports introduced in this PR.
Preserve behavior exactly and keep diffs minimal.
- enabled: true
name: "harden error messages"
instructions: |
Improve low-context error messages changed by this PR.
Keep message content actionable, include operation context, and preserve error wrapping semantics.
- enabled: true
name: "test clarity pass"
instructions: |
Improve changed test names and assertion messages for readability.
Do not rewrite test logic unless a correctness issue is found.
pre_merge_checks:
override_requested_reviewers_only: false
docstrings:
mode: warning
threshold: 85
title:
mode: error
requirements: "Use Conventional Commit style in the PR title: <type>(<scope>): <subject>. Include a linked issue when applicable."
description:
mode: error
issue_assessment:
mode: warning
custom_checks:
- mode: warning
name: "Kotlin Layer Boundary"
instructions: |
For files under *-domain modules, fail if imports reference adapter or bootstrap packages.
For files under *-application modules, flag direct dependency on infrastructure-specific framework classes unless justified.
- mode: warning
name: "Go Error Context"
instructions: |
In changed Go code, when an external call returns an error and the function adds business context,
require wrapped errors (%w) so callers can use errors.Is/errors.As.
- mode: warning
name: "Bazel Formatting"
instructions: |
If BUILD.bazel or .bzl files are changed, require buildifier-compatible formatting and stable target naming.
- mode: warning
name: "Behavior Change Needs Tests"
instructions: |
If production logic is changed in Kotlin or Go files, require corresponding test updates in the same subsystem
unless the PR description explicitly justifies why tests are unnecessary.
- mode: warning
name: "TODO Must Reference Issue"
instructions: |
Flag TODO/FIXME comments introduced by this PR that do not include an issue reference
in the form #123 or a full tracker key like PROJ-123.
tools:
ast-grep:
rule_dirs: []
util_dirs: []
essential_rules: true
packages: []
shellcheck:
enabled: true
ruff:
enabled: false
markdownlint:
enabled: true
github-checks:
enabled: true
timeout_ms: 180000
languagetool:
enabled: true
enabled_rules: []
disabled_rules: []
enabled_categories: []
disabled_categories: []
enabled_only: false
level: default
biome:
enabled: false
hadolint:
enabled: true
swiftlint:
enabled: false
phpstan:
enabled: false
level: default
phpmd:
enabled: false
phpcs:
enabled: false
golangci-lint:
enabled: true
yamllint:
enabled: true
gitleaks:
enabled: true
trufflehog:
enabled: true
checkov:
enabled: true
tflint:
enabled: true
detekt:
enabled: true
eslint:
enabled: false
flake8:
enabled: false
fortitudeLint:
enabled: false
rubocop:
enabled: false
buf:
enabled: false
regal:
enabled: false
actionlint:
enabled: true
pmd:
enabled: false
clang:
enabled: false
cppcheck:
enabled: false
opengrep:
enabled: true
semgrep:
enabled: true
circleci:
enabled: false
clippy:
enabled: false
sqlfluff:
enabled: false
trivy:
enabled: true
prismaLint:
enabled: false
pylint:
enabled: false
oxc:
enabled: false
shopifyThemeCheck:
enabled: false
luacheck:
enabled: false
brakeman:
enabled: false
dotenvLint:
enabled: true
htmlhint:
enabled: false
stylelint:
enabled: false
checkmake:
enabled: true
osvScanner:
enabled: true
blinter:
enabled: false
smartyLint:
enabled: false
psscriptanalyzer:
enabled: false
chat:
art: false
auto_reply: true
integrations:
jira:
usage: disabled
linear:
usage: disabled
knowledge_base:
opt_out: false
web_search:
enabled: true
code_guidelines:
enabled: true
filePatterns:
- "**/AGENTS.md"
- "**/AGENT.md"
- "**/CLAUDE.md"
- "**/GEMINI.md"
- ".github/copilot-instructions.md"
- ".github/instructions/*.instructions.md"
- "documents/**/*.md"
- ".github/PULL_REQUEST_TEMPLATE/**/*.md"
learnings:
scope: local
issues:
scope: local
jira:
usage: disabled
project_keys: []
linear:
usage: disabled
team_keys: []
pull_requests:
scope: local
mcp:
usage: auto
disabled_servers: []
linked_repositories: []
code_generation:
docstrings:
language: ko-KR
path_instructions:
- path: "**/*.kt"
instructions: |
Generate KDoc in English with concise summary, parameter docs, return semantics, thrown exceptions,
and side effects where relevant. Keep docs behavior-focused and avoid repeating obvious type information.
- path: "**/*.go"
instructions: |
Generate Go doc comments in English that start with the symbol name.
Document behavior, edge cases, error conditions, and concurrency expectations when relevant.
- path: "**/*.bzl"
instructions: |
Document macro/rule intent, attribute expectations, defaults, and generated targets.
unit_tests:
path_instructions:
- path: "**/*.kt"
instructions: |
Generate tests using deterministic setup, clear naming, and focused assertions.
Cover nullability boundaries, domain invariants, and failure paths for changed behavior.
- path: "**/*.go"
instructions: |
Prefer table-driven tests where it improves clarity.
Cover error wrapping behavior, context cancellation handling, and edge-case inputs.
- path: "**/BUILD.bazel"
instructions: |
When build target behavior changes, ensure affected test targets are updated and runnable.
issue_enrichment:
auto_enrich:
enabled: true
planning:
enabled: true
auto_planning:
enabled: true
labels:
- "feature"
- "enhancement"
- "bug"
- "incident"
- "!wip"
labeling:
labeling_instructions:
- label: "bug"
instructions: "Behavior is incorrect, broken, or regressed compared with expected functionality."
- label: "feature"
instructions: "Introduces net-new product capability or API behavior."
- label: "enhancement"
instructions: "Improves existing behavior without introducing a new product surface area."
- label: "documentation"
instructions: "Primarily changes docs, templates, or explanatory text."
- label: "infra"
instructions: "Touches CI, build system, infrastructure code, deployment, or observability setup."
- label: "security"
instructions: "Addresses security findings, authentication/authorization, data exposure, or secret handling."
auto_apply_labels: false