-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
231 lines (211 loc) · 8.53 KB
/
.coderabbit.yaml
File metadata and controls
231 lines (211 loc) · 8.53 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
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: ko-KR
tone_instructions: "Give clear feedback in a constructive tone focused on actionable improvements; write comments in formal polite Korean."
early_access: true
enable_free_tier: true
reviews:
profile: chill
request_changes_workflow: true
high_level_summary: true
high_level_summary_placeholder: "@coderabbitai summary"
high_level_summary_in_walkthrough: true
sequence_diagrams: false
suggested_labels: false
auto_apply_labels: false
assess_linked_issues: false
related_issues: false
related_prs: false
suggested_reviewers: false
auto_assign_reviewers: false
poem: false
auto_title_placeholder: "@coderabbitai"
review_status: true
commit_status: true
fail_commit_status: false
collapse_walkthrough: false
changed_files_summary: true
labeling_instructions: [ ]
path_filters:
- "**/*"
- "**/gen/**"
- "!**/test/**/gen/**"
- "!**/.git/**"
- "!**/target/**"
- "!**/build/**"
- "!**/.gradle/**"
- "!**/node_modules/**"
- "!**/dist/**"
- "!**/out/**"
- "!**/.idea/**"
- "!**/.vscode/**"
- "!**/swagger.json"
- "!**/README.md"
path_instructions:
- path: "**/*"
instructions: |
- For every finding, include evidence: file path(s), line number(s), rule names (e.g., Checkstyle), and links to credible docs when relevant.
- Wrap any tokens starting with '@' (e.g., `@JoinColumn`) in backticks in PR comments.
- path: "**/*.sql"
instructions: |
- As a team convention, we do not specify FK constraints. Please avoid suggesting adding FK constraints in code reviews.
- For columns used as primary keys (PK) or foreign keys (FK), the column type must be specified as "bigint".
- If a column name is "id" or ends with "_id", verify that its SQL type is "bigint"; otherwise, emit a high-severity warning prefixed with "🚨🚨🚨".
- path: "**/*.java"
instructions: |
- Review against Java 21 and the rules in `/.rules/checkstyle-rules.xml`.
- Indentation: use spaces (no tabs), tab width = 4 spaces; files must end with Unix LF newline. (Team adaptation)
- Maximum line length: 120 characters.
- Imports: single-class imports only; allow wildcard for static imports; group imports with blank lines between sections.
- Operators: always one space before and after; on line breaks, place operators at the start of the next line (commas stay at end of line, dots at start of new line).
- Lambda expressions: omit parentheses for a single parameter; surround `->` with spaces (`param -> expression`); use braces and explicit `return` for multi-statement bodies; choose short, clear parameter names.
- Prefer Java 21 standard APIs over Guava.
- Do not annotate immutable local variables with `final` unless required for an inner class.
- Allow the `var` keyword when the value is a cast `null`.
- For the complete NAVER Campus Hackday conventions, see: https://naver.github.io/hackday-conventions-java/
- path: "**/main/java/**/*.java"
instructions: |
- This project is mature and must preserve a stable, backward-compatible public Java API.
- In the "Changes" section, list up to 25 changes to the public Java API that could affect end users; if none, explicitly state "No public Java API changes in this PR."
- Define the public Java API as public/protected methods on public classes plus `module-info.java`.
- Derive the list by deeply analyzing code flow, including through private methods and calls to Java 21 and Guava.
- Report:
* New or removed public API methods
* Changes to return types or parameter types
* Behavioral changes that may impact consumers
- Use `System.out.println` instead of logging frameworks.
- For performance reasons, the project prefers for-loops; do not suggest converting between loops and streams.
- path: "**/test/java/**/*.java"
instructions: |
- Prioritize correctness of assertions, coverage of edge cases, and clear test naming/documentation.
- Be lenient on style and minor optimizations in tests.
- path: "**/application/usecase/**/*.java"
instructions: |
- Use cases must be defined as interfaces with a single public method representing one business operation.
- Method names should clearly express the business intent (e.g., `create`, `delete`, `accept`, `send`).
- Avoid multiple unrelated operations in a single use case interface.
- Keep method signatures simple and focused; use Command or Query objects for complex parameters.
- path: "**/application/command/**/*.java"
instructions: |
- Commands must be immutable records.
- All input validation must occur in the compact constructor.
- Normalize inputs (e.g., `strip()` for strings) in the compact constructor before validation.
- Provide sensible defaults for optional fields (e.g., `Set.of()` for empty collections).
- Throw `BusinessException` with appropriate `ErrorCode` for validation failures.
- Commands should represent write operations; avoid query-related fields unless necessary for the write operation.
- path: "**/application/query/**/*.java"
instructions: |
- Queries must be immutable records.
- All input validation must occur in the compact constructor.
- Validate pagination parameters (e.g., `size > 0`, `size <= 100`, `lastId > 0`).
- Throw `BusinessException` with appropriate `ErrorCode` for validation failures.
- Queries should only contain parameters needed for read operations.
- path: "**/application/result/**/*.java"
instructions: |
- Results must be immutable records.
- Use static factory methods named `from` to convert from domain or query results.
- Results should only expose data needed by the presentation layer; avoid leaking domain internals.
- Prefer composition over deeply nested structures.
- path: "**/application/service/**/*Service.java"
instructions: |
- Services must be annotated with `@Service` and implement one or more use case interfaces.
- Follow the Read/Write separation pattern: use separate classes for read operations (e.g., `FriendReadService`) and write operations (e.g., `FriendWriteService`).
- Write operations must be annotated with `@Transactional`.
- Read operations should use `@Transactional(readOnly = true)` when appropriate.
- Services should orchestrate domain logic, not contain it; delegate business rules to domain entities.
- Throw `BusinessException` with appropriate `ErrorCode` for business rule violations.
- Avoid direct manipulation of entities; prefer calling domain methods.
abort_on_close: true
disable_cache: false
auto_review:
enabled: true
auto_incremental_review: true
ignore_title_keywords: [ ]
labels: [ ]
drafts: false
base_branches: [ ]
tools:
shellcheck:
enabled: true
ruff:
enabled: false
markdownlint:
enabled: true
github-checks:
enabled: true
timeout_ms: 90000
languagetool:
enabled: true
enabled_only: false
level: default
enabled_rules: [ ]
disabled_rules:
- EN_UNPAIRED_BRACKETS
- EN_UNPAIRED_QUOTES
enabled_categories: [ ]
disabled_categories:
- TYPOS
- TYPOGRAPHY
- CASING
biome:
enabled: true
hadolint:
enabled: false
swiftlint:
enabled: false
phpstan:
enabled: false
level: default
golangci-lint:
enabled: false
yamllint:
enabled: true
gitleaks:
enabled: true
checkov:
enabled: false
detekt:
enabled: false
eslint:
enabled: true
rubocop:
enabled: false
buf:
enabled: false
regal:
enabled: false
actionlint:
enabled: true
pmd:
enabled: true
cppcheck:
enabled: false
semgrep:
enabled: true
circleci:
enabled: true
ast-grep:
packages: [ ]
rule_dirs: [ ]
util_dirs: [ ]
essential_rules: true
chat:
auto_reply: true
knowledge_base:
opt_out: false
web_search:
enabled: true
code_guidelines:
enabled: true
filePatterns: [ ]
learnings:
scope: auto
issues:
scope: auto
jira:
usage: auto
project_keys: [ ]
linear:
usage: auto
team_keys: [ ]
pull_requests:
scope: auto