forked from crossplane/function-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
222 lines (180 loc) · 7.53 KB
/
.coderabbit.yaml
File metadata and controls
222 lines (180 loc) · 7.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
# CodeRabbit Configuration for Crossplane Function SDK for Go
# This configuration is optimized for the Crossplane Function SDK Go library
# =============================================================================
# GLOBAL SETTINGS
# =============================================================================
# Language for CodeRabbit reviews and comments (default: en-US, keeping explicit)
language: "en-US"
# Instructions for CodeRabbit's tone and style in reviews (max 250 chars)
tone_instructions: |
Be collaborative and supportive. Ask clarifying questions rather than making
assumptions. Focus on the 'why' behind decisions. Frame concerns
constructively and thank contributors.
# Disable early-access features for stability
early_access: false
# =============================================================================
# REVIEWS
# =============================================================================
reviews:
# We tested assertive and found it too verbose, e.g. approxing 200 comments on
# https://github.com/crossplane/crossplane/pull/6777. Some of the nitpicks do
# look valuable to me, but the signal to noise ratio isn't good enough.
profile: "chill"
# Don't generate summary in PR description - let authors write their own
high_level_summary: false
# Include the high-level summary in the walkthrough comment instead
high_level_summary_in_walkthrough: true
# Collapse walkthrough comment to reduce visual clutter in PRs
collapse_walkthrough: true
# Enable automatic label application
auto_apply_labels: true
# Automatically assign suggested reviewers (disabled - let maintainers control)
auto_assign_reviewers: false
# Disable poem generation in walkthrough comments
poem: false
# Disable review status messages to reduce comment noise
review_status: false
# Focus reviews on source code, exclude generated and vendor files
path_filters:
# Include source code
- "**/*.go"
- "**/*.yaml"
- "**/*.yml"
- "**/*.md"
- "**/*.proto"
- "**/Dockerfile*"
- "**/Earthfile"
- "**/*.sh"
# Exclude generated and vendor files
- "!**/zz_generated*.go"
- "!**/vendor/**"
- "!**/node_modules/**"
- "!**/*.pb.go"
- "!**/*.pb.gw.go"
- "!**/mock_*.go"
- "!**/fake/**"
- "!**/testdata/**"
- "!**/dist/**"
- "!**/build/**"
- "!**/.tmp-earthly-out/**"
# Path-specific instructions for different areas of the codebase
path_instructions:
- path: "**/*.go"
instructions: |
Enforce Crossplane-specific patterns: Use function-sdk-go/errors
for wrapping. Check variable naming (short for local scope, descriptive
for wider scope). Ensure 'return early' pattern. Verify error scoping
(declare in conditionals when possible). For nolint directives, require
specific linter names and explanations. CRITICAL: Ensure all error
messages are meaningful to end users, not just developers - avoid
technical jargon, include context about what the user was trying to do,
and suggest next steps when possible.
- path: "**/*_test.go"
instructions: |
Enforce table-driven test structure: PascalCase test names (no
underscores), args/want pattern, use cmp.Diff with
cmpopts.EquateErrors() for error testing. Check for proper test case
naming and reason fields. Ensure no third-party test frameworks (no
Ginkgo, Gomega, Testify).
- path: "**/*.md"
instructions: |
Ensure Markdown files are wrapped at 100 columns for consistency and
readability. Lines can be longer if it makes links more readable, but
otherwise should wrap at 100 characters. Check for proper heading
structure, clear language, and that documentation is helpful for users.
- path: "**/test/**"
instructions: |
Focus on test coverage, test clarity, and proper use of testing
utilities. Ask about testing scenarios and edge cases. Ensure tests are
maintainable and cover the happy path and error conditions. Verify
error testing uses proper patterns (cmpopts.EquateErrors, sentinel
errors for complex cases).
# Automatic review settings
auto_review:
# Skip reviewing draft PRs until they're ready for review (default: false, keeping explicit)
drafts: false
# Skip reviews if PR title contains these keywords (case-insensitive)
ignore_title_keywords:
- "wip"
- "draft"
- "do not merge"
- "dnm"
# Skip reviews from these automated bot accounts
ignore_usernames:
- "dependabot[bot]"
- "renovate[bot]"
- "github-actions[bot]"
# Quality gates that run during CodeRabbit's review to check PR readiness
pre_merge_checks:
# Check PR title for length and descriptiveness
title:
requirements: "Keep under 72 characters and be descriptive about what the change does."
# Disable docstring coverage check (too noisy for Go projects)
docstrings:
mode: "off"
# Custom checks specific to Crossplane Function SDK development practices
custom_checks:
- name: "Breaking Changes"
mode: "error"
instructions: |
Fails if any public Go code (exported functions, types, methods, or
fields) in '**/*.go' (excluding *_test.go and generated files) is
removed, renamed, has signature changes, or has behavior changes that
could break existing users, without the 'breaking-change' label. This
is a library repo - all exported APIs are public.
# Disable automatic code generation features
finishing_touches:
# Disable automatic docstring generation
docstrings:
enabled: false
# Disable automatic unit test generation
unit_tests:
enabled: false
# Tools - DISABLED: We prefer to run linting tools directly in CI
# Our comprehensive golangci-lint setup with "default: all" already covers
# most static analysis. Additional tools can be added to CI as needed.
tools:
# Go linting - disabled (we run golangci-lint with comprehensive config)
golangci-lint:
enabled: false
# Security and vulnerability scanning - disabled (prefer direct CI integration)
gitleaks:
enabled: false
semgrep:
enabled: false
osvScanner:
enabled: false
# File format linting - disabled (prefer direct CI integration)
yamllint:
enabled: false
markdownlint:
enabled: false
shellcheck:
enabled: false
hadolint:
enabled: false
actionlint:
enabled: false
buf:
enabled: false
# GitHub integration - disabled for now
github-checks:
enabled: false
# =============================================================================
# CHAT
# Interactive chat with CodeRabbit in PR comments. You can ask questions like:
# - @coderabbitai explain this error handling approach
# - @coderabbitai what are the edge cases for this function?
# - @coderabbitai how does this affect backward compatibility?
# - @coderabbitai generate unit tests for this function
# =============================================================================
chat:
# Disable ASCII/emoji art in responses
art: false
# =============================================================================
# KNOWLEDGE BASE
# =============================================================================
knowledge_base:
# Enable MCP integration to provide context about external libraries and APIs
mcp:
usage: "enabled"